aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorRamakrishna Pallala <ramakrishna.pallala@intel.com>2014-08-27 14:14:08 -0400
committerSebastian Reichel <sre@kernel.org>2014-09-06 15:05:04 -0400
commita8adcc9012d8502e06ba7b3f966bad8f2c58edc3 (patch)
treeb48ccc27bb9d4cf11dea461a09ab424e18b7ebfb /drivers/power
parentb1022e247872dc87a6ffd6f9aa6a92e0b67cdf00 (diff)
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 'drivers/power')
-rw-r--r--drivers/power/power_supply_sysfs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c
index 750a20275664..7e4726d37211 100644
--- a/drivers/power/power_supply_sysfs.c
+++ b/drivers/power/power_supply_sysfs.c
@@ -149,9 +149,11 @@ static struct device_attribute power_supply_attrs[] = {
149 POWER_SUPPLY_ATTR(voltage_now), 149 POWER_SUPPLY_ATTR(voltage_now),
150 POWER_SUPPLY_ATTR(voltage_avg), 150 POWER_SUPPLY_ATTR(voltage_avg),
151 POWER_SUPPLY_ATTR(voltage_ocv), 151 POWER_SUPPLY_ATTR(voltage_ocv),
152 POWER_SUPPLY_ATTR(voltage_boot),
152 POWER_SUPPLY_ATTR(current_max), 153 POWER_SUPPLY_ATTR(current_max),
153 POWER_SUPPLY_ATTR(current_now), 154 POWER_SUPPLY_ATTR(current_now),
154 POWER_SUPPLY_ATTR(current_avg), 155 POWER_SUPPLY_ATTR(current_avg),
156 POWER_SUPPLY_ATTR(current_boot),
155 POWER_SUPPLY_ATTR(power_now), 157 POWER_SUPPLY_ATTR(power_now),
156 POWER_SUPPLY_ATTR(power_avg), 158 POWER_SUPPLY_ATTR(power_avg),
157 POWER_SUPPLY_ATTR(charge_full_design), 159 POWER_SUPPLY_ATTR(charge_full_design),
@@ -193,6 +195,7 @@ static struct device_attribute power_supply_attrs[] = {
193 POWER_SUPPLY_ATTR(type), 195 POWER_SUPPLY_ATTR(type),
194 POWER_SUPPLY_ATTR(scope), 196 POWER_SUPPLY_ATTR(scope),
195 POWER_SUPPLY_ATTR(charge_term_current), 197 POWER_SUPPLY_ATTR(charge_term_current),
198 POWER_SUPPLY_ATTR(calibrate),
196 /* Properties of type `const char *' */ 199 /* Properties of type `const char *' */
197 POWER_SUPPLY_ATTR(model_name), 200 POWER_SUPPLY_ATTR(model_name),
198 POWER_SUPPLY_ATTR(manufacturer), 201 POWER_SUPPLY_ATTR(manufacturer),