From 8af18578d92f1b77bfd6ff26d147e1ab03a03dc1 Mon Sep 17 00:00:00 2001 From: Harry Yang Date: Wed, 31 Aug 2016 16:07:30 -0700 Subject: [PATCH] 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 --- drivers/power/power_supply_sysfs.c | 2 ++ include/linux/power_supply.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c index f9edec12dd48..e47b0d177947 100644 --- a/drivers/power/power_supply_sysfs.c +++ b/drivers/power/power_supply_sysfs.c @@ -229,6 +229,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 4dc4e1c2a212..424e5d08e941 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -175,6 +175,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,