From 3eef5574c53a21ff6673ce8cc8b652848aac45b5 Mon Sep 17 00:00:00 2001 From: AleX Pelosi Date: Fri, 12 Oct 2018 14:48:10 -0700 Subject: [PATCH] ANDROID: GKI: power: supply: add CHARGE_CHARGER_STATE property POWER_SUPPLY_PROP_CHARGE_CHARGER_STATE and charge_charger_state property are used from charging code to trigger the calculation of charging current and charging voltage Signed-off-by: AleX Pelosi Signed-off-by: Jack Wu Bug: 139264914 Test: recompile (cherry picked from commit 67fd59eccfe2db28d9167d5aeef8f6dd001f3cb1) Signed-off-by: Mark Salyzyn Bug: 150789066 Change-Id: I5df44a650b10a078cd79842fff32e2ab92c0195d --- drivers/power/supply/power_supply_sysfs.c | 1 + include/linux/power_supply.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c index a028d2d1e4f4..c4dffee96c51 100644 --- a/drivers/power/supply/power_supply_sysfs.c +++ b/drivers/power/supply/power_supply_sysfs.c @@ -497,6 +497,7 @@ static struct device_attribute power_supply_attrs[] = { POWER_SUPPLY_ATTR(cp_ilim), /* Local extensions of type int64_t */ POWER_SUPPLY_ATTR(charge_counter_ext), + POWER_SUPPLY_ATTR(charge_charger_state), /* Properties of type `const char *' */ POWER_SUPPLY_ATTR(model_name), POWER_SUPPLY_ATTR(ptmc_id), diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index df9a68527fa4..68717a5856a0 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -362,6 +362,7 @@ enum power_supply_property { POWER_SUPPLY_PROP_CP_ILIM, /* Local extensions of type int64_t */ POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT, + POWER_SUPPLY_PROP_CHARGE_CHARGER_STATE, /* Properties of type `const char *' */ POWER_SUPPLY_PROP_MODEL_NAME, POWER_SUPPLY_PROP_PTMC_ID,