diff options
author | Todd Poynor <toddpoynor@google.com> | 2013-12-12 15:59:09 -0800 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2016-02-16 13:53:37 -0800 |
commit | 8774e7626bef4888bb3651de3b7dd38598ea672e (patch) | |
tree | 9693e8427df1c448732dcd5e42b17f5d70e2b3b0 /include | |
parent | 4407d13a09440957991b89471e635c3fffc91a21 (diff) |
power: Add property CHARGE_COUNTER_EXT and 64-bit precision properties
Add POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT that stores accumulated charge
in nAh units as a signed 64-bit value.
Add generic support for signed 64-bit property values.
Change-Id: I2bd34b1e95ffba24e7bfef81f398f22bd2aaf05e
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/power_supply.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 6544861435d3..1c075892c6fd 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -18,6 +18,7 @@ #include <linux/leds.h> #include <linux/spinlock.h> #include <linux/notifier.h> +#include <linux/types.h> /* * All voltages, currents, charges, energies, time and temperatures in uV, @@ -152,6 +153,8 @@ enum power_supply_property { POWER_SUPPLY_PROP_USB_HC, POWER_SUPPLY_PROP_USB_OTG, POWER_SUPPLY_PROP_CHARGE_ENABLED, + /* Local extensions of type int64_t */ + POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT, /* Properties of type `const char *' */ POWER_SUPPLY_PROP_MODEL_NAME, POWER_SUPPLY_PROP_MANUFACTURER, @@ -176,6 +179,7 @@ enum power_supply_notifier_events { union power_supply_propval { int intval; const char *strval; + int64_t int64val; }; struct device_node; |