insmod swap_sampler.ko || exit 1
insmod swap_energy.ko || exit 1
insmod swap_message_parser.ko || exit 1 # parser is loaded
+
+~
+# Energy coefficients
+# CPU coefficients are divided by 10^6 because
+# - they were calculated for mAs
+# - SWAP modules count nanoseconds
+# - result should be exposed in uAs
+# Flash coefficients are multiplied by 10^3 because
+# - they were calculated for mAs
+# - result should be exposed in uAs
+
+# cpu idle: 76.8301 / 1
+echo 76830 > /sys/kernel/debug/swap/energy/cpu_idle/numerator &&
+echo 1000000000 > /sys/kernel/debug/swap/energy/cpu_idle/denominator &&
+
+# cpu running: 253.29 / 1
+echo 253290 > /sys/kernel/debug/swap/energy/cpu_running/numerator &&
+echo 1000000000 > /sys/kernel/debug/swap/energy/cpu_running/denominator &&
+
+# flash read: 106.249 / 69998585
+echo 106249 > /sys/kernel/debug/swap/energy/flash_read/numerator &&
+echo 69998585 > /sys/kernel/debug/swap/energy/flash_read/denominator &&
+
+# flash write: 131.443 / 31129333
+echo 131443 > /sys/kernel/debug/swap/energy/flash_write/numerator &&
+echo 31129333 > /sys/kernel/debug/swap/energy/flash_write/denominator