From 958192fe7ff4e2fdcc37eba7a294190c5c7bf90b Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Mon, 24 Feb 2020 14:40:49 -0800 Subject: [PATCH] ANDROID: GKI: power: supply: Add POWER_SUPPLY_PROP_CC_UAH Partially taken from commit d575e152ce0282819b8696e5a9fe0aac4f205b91 ("qpnp-qg: get cc_uah from qg psy property") Signed-off-by: Jack Wu Bug: 141451339 (cherry picked from commit d575e152ce0282819b8696e5a9fe0aac4f205b91) Signed-off-by: Mark Salyzyn Bug: 150789066 Change-Id: If3bb3c34cc2065cce0ac42889d1b5118e716a73f --- 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 4a41814155d0..5ee71a64ede8 100644 --- a/drivers/power/supply/power_supply_sysfs.c +++ b/drivers/power/supply/power_supply_sysfs.c @@ -474,6 +474,7 @@ static struct device_attribute power_supply_attrs[] = { POWER_SUPPLY_ATTR(adapter_details), POWER_SUPPLY_ATTR(dead_battery), POWER_SUPPLY_ATTR(voltage_fifo), + POWER_SUPPLY_ATTR(cc_uah), /* Capacity Estimation */ POWER_SUPPLY_ATTR(batt_ce_ctrl), POWER_SUPPLY_ATTR(batt_ce_full), diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index e9d989ffb73e..33917e419d1e 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -339,6 +339,7 @@ enum power_supply_property { POWER_SUPPLY_PROP_ADAPTER_DETAILS, POWER_SUPPLY_PROP_DEAD_BATTERY, POWER_SUPPLY_PROP_VOLTAGE_FIFO, + POWER_SUPPLY_PROP_CC_UAH, /* Capacity Estimation */ POWER_SUPPLY_PROP_BATT_CE_CTRL, POWER_SUPPLY_PROP_CHARGE_FULL_ESTIMATE,