From c4b94d4cb0fca212c2c90e45ea1a842f1c7b9535 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_VOLTAGE_FIFO Partially taken from commit e2ad4f0b2c946a0582cb5c3a41ab3a50224c6b73 ("qpnp-qg: calculate Vbat FIFO averages for FVSS scaling") Signed-off-by: Jack Wu Bug: 141451339 (cherry picked from commit e2ad4f0b2c946a0582cb5c3a41ab3a50224c6b73) Signed-off-by: Mark Salyzyn Bug: 150789066 Change-Id: Id6da95c93322bd3c84f6450fad4bfa2d50a9c2ce --- 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 ca1047584172..4a41814155d0 100644 --- a/drivers/power/supply/power_supply_sysfs.c +++ b/drivers/power/supply/power_supply_sysfs.c @@ -473,6 +473,7 @@ static struct device_attribute power_supply_attrs[] = { POWER_SUPPLY_ATTR(charge_disable), POWER_SUPPLY_ATTR(adapter_details), POWER_SUPPLY_ATTR(dead_battery), + POWER_SUPPLY_ATTR(voltage_fifo), /* 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 af3273b36bcc..e9d989ffb73e 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -338,6 +338,7 @@ enum power_supply_property { POWER_SUPPLY_PROP_CHARGE_DISABLE, POWER_SUPPLY_PROP_ADAPTER_DETAILS, POWER_SUPPLY_PROP_DEAD_BATTERY, + POWER_SUPPLY_PROP_VOLTAGE_FIFO, /* Capacity Estimation */ POWER_SUPPLY_PROP_BATT_CE_CTRL, POWER_SUPPLY_PROP_CHARGE_FULL_ESTIMATE,