Subject: [PATCH] use charge_now when energy_now is not present
From: mstsxfx@gmail.com
Some batteries (like one in the Futjitsu Siemens Lifebook S71110) don't
export energy_now attribute and exports only change_now in the power_supply
sys directory.
However, we can use this value when it is multiplied by current voltage.
In addition, /sys/class/power_supply/*/current_* are in µA according to the
linux-src/Documentation/power/power_supply_class.txt and not in µW as
expected by the original code
Signed-off-by: Michal Hocko <mstsxfx@gmail.com>
---
Fixed a minor compilation warning -- Auke
git-svn-id: https://powertop.googlecode.com/svn/trunk@300 0bbd23ad-e62f-0410-b3b3-4ddab988b7fa
3 files changed