summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarry Yang <harryy@codeaurora.org>2016-08-31 16:07:30 -0700
committerHarry Yang <harryy@codeaurora.org>2016-09-07 00:45:05 -0700
commit192d510128470c15c8371efd560929e34df87532 (patch)
treeda11c4daa10a4ce1dd01619c0f5108f38ecb1976
parent11d6060fffff4b7e87d1cadb5f65dfc7f74332cc (diff)
power_supply: add two properties for step charging
STEP_CHARGING_ENABLED indicates if step charging is enabled or not. STEP_CHARGING_STEP reflects step charging phase. Both properties are added for the purpose of testing and debugging. CRs-Fixed: 1052854 Change-Id: I7d7517ab3f172016bb2f1c23fb2788bbd2d01086 Signed-off-by: Harry Yang <harryy@codeaurora.org>
-rw-r--r--drivers/power/power_supply_sysfs.c2
-rw-r--r--include/linux/power_supply.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c
index b1c3441b285a..545a1e684b25 100644
--- a/drivers/power/power_supply_sysfs.c
+++ b/drivers/power/power_supply_sysfs.c
@@ -227,6 +227,8 @@ static struct device_attribute power_supply_attrs[] = {
POWER_SUPPLY_ATTR(usb_otg),
POWER_SUPPLY_ATTR(battery_charging_enabled),
POWER_SUPPLY_ATTR(charging_enabled),
+ POWER_SUPPLY_ATTR(step_charging_enabled),
+ POWER_SUPPLY_ATTR(step_charging_step),
POWER_SUPPLY_ATTR(pin_enabled),
POWER_SUPPLY_ATTR(input_suspend),
POWER_SUPPLY_ATTR(input_voltage_regulation),
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index 56e78254286e..03853d956b41 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -176,6 +176,8 @@ enum power_supply_property {
POWER_SUPPLY_PROP_USB_OTG,
POWER_SUPPLY_PROP_BATTERY_CHARGING_ENABLED,
POWER_SUPPLY_PROP_CHARGING_ENABLED,
+ POWER_SUPPLY_PROP_STEP_CHARGING_ENABLED,
+ POWER_SUPPLY_PROP_STEP_CHARGING_STEP,
POWER_SUPPLY_PROP_PIN_ENABLED,
POWER_SUPPLY_PROP_INPUT_SUSPEND,
POWER_SUPPLY_PROP_INPUT_VOLTAGE_REGULATION,