diff options
author | Ramakrishna Pallala <ramakrishna.pallala@intel.com> | 2014-08-27 23:44:08 +0530 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2014-09-06 21:05:04 +0200 |
commit | a8adcc9012d8502e06ba7b3f966bad8f2c58edc3 (patch) | |
tree | b48ccc27bb9d4cf11dea461a09ab424e18b7ebfb /include/linux/power_supply.h | |
parent | b1022e247872dc87a6ffd6f9aa6a92e0b67cdf00 (diff) | |
download | op-kernel-dev-a8adcc9012d8502e06ba7b3f966bad8f2c58edc3.zip op-kernel-dev-a8adcc9012d8502e06ba7b3f966bad8f2c58edc3.tar.gz |
power_supply: Add boot and calibration attributes
Usually PMIC's come with coulomb counting mechanism which can be
used to implement a Fuel Gauginig solution in Software itself.
One of key input to these SW Fuel Gauge solutioons is the boot up
parameters like boot voltage and boot current.
This patch adds the VOLTAGE_BOOT and CURRENT_BOOT power supply attributes
to report bootup voltage and current.
This patch also adds CALIBRATE power supply attribute which useful is
for calibrating the battery/coulomb counter.
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'include/linux/power_supply.h')
-rw-r--r-- | include/linux/power_supply.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index f3dea41..de59a28 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -102,9 +102,11 @@ enum power_supply_property { POWER_SUPPLY_PROP_VOLTAGE_NOW, POWER_SUPPLY_PROP_VOLTAGE_AVG, POWER_SUPPLY_PROP_VOLTAGE_OCV, + POWER_SUPPLY_PROP_VOLTAGE_BOOT, POWER_SUPPLY_PROP_CURRENT_MAX, POWER_SUPPLY_PROP_CURRENT_NOW, POWER_SUPPLY_PROP_CURRENT_AVG, + POWER_SUPPLY_PROP_CURRENT_BOOT, POWER_SUPPLY_PROP_POWER_NOW, POWER_SUPPLY_PROP_POWER_AVG, POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN, @@ -146,6 +148,7 @@ enum power_supply_property { POWER_SUPPLY_PROP_TYPE, /* use power_supply.type instead */ POWER_SUPPLY_PROP_SCOPE, POWER_SUPPLY_PROP_CHARGE_TERM_CURRENT, + POWER_SUPPLY_PROP_CALIBRATE, /* Properties of type `const char *' */ POWER_SUPPLY_PROP_MODEL_NAME, POWER_SUPPLY_PROP_MANUFACTURER, @@ -291,6 +294,7 @@ static inline bool power_supply_is_amp_property(enum power_supply_property psp) case POWER_SUPPLY_PROP_CURRENT_MAX: case POWER_SUPPLY_PROP_CURRENT_NOW: case POWER_SUPPLY_PROP_CURRENT_AVG: + case POWER_SUPPLY_PROP_CURRENT_BOOT: return 1; default: break; @@ -315,6 +319,7 @@ static inline bool power_supply_is_watt_property(enum power_supply_property psp) case POWER_SUPPLY_PROP_VOLTAGE_NOW: case POWER_SUPPLY_PROP_VOLTAGE_AVG: case POWER_SUPPLY_PROP_VOLTAGE_OCV: + case POWER_SUPPLY_PROP_VOLTAGE_BOOT: case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE: case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX: case POWER_SUPPLY_PROP_POWER_NOW: |