From 3bc16e441fd4bc7ad17f4d37784a8aaba9a16d79 Mon Sep 17 00:00:00 2001 From: Anirudh Ghayal Date: Sat, 21 Mar 2020 10:24:04 +0530 Subject: [PATCH] ANDROID: GKI: power_supply: Add FG_TYPE power-supply property Use the FG_TYPE property to report the type of FG present in the system. For example on QG, it is voltage-mode based QG or cc-mode based QG. Change-Id: Iaad3ad29b2d778eed215d420a23b601587163e83 Bug: 155087902 Signed-off-by: Anirudh Ghayal (cherry picked from commit 1c044cbc16076f1e0cd328e6b6684eb57c1ba07b) Signed-off-by: Will McVicker --- 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 da6b5367db3f..2894700c3486 100644 --- a/drivers/power/supply/power_supply_sysfs.c +++ b/drivers/power/supply/power_supply_sysfs.c @@ -506,6 +506,7 @@ static struct device_attribute power_supply_attrs[] = { POWER_SUPPLY_ATTR(parallel_output_mode), POWER_SUPPLY_ATTR(alignment), POWER_SUPPLY_ATTR(moisture_detection_enabled), + POWER_SUPPLY_ATTR(fg_type), /* Local extensions of type int64_t */ POWER_SUPPLY_ATTR(charge_counter_ext), POWER_SUPPLY_ATTR(charge_charger_state), diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 6c5e0e1276a3..2dae1837a21a 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -389,6 +389,7 @@ enum power_supply_property { POWER_SUPPLY_PROP_PARALLEL_OUTPUT_MODE, POWER_SUPPLY_PROP_ALIGNMENT, POWER_SUPPLY_PROP_MOISTURE_DETECTION_ENABLE, + POWER_SUPPLY_PROP_FG_TYPE, /* Local extensions of type int64_t */ POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT, POWER_SUPPLY_PROP_CHARGE_CHARGER_STATE,