From aadbdeecbd9b5aa2ef7cd77222fd47cdf6aac149 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_PTMC_ID Partially taken from commit e13cae32a425959e886fb91e83205a398285b708 ("p9221_charger: add attribute for read PTMC ID") Signed-off-by: YiHsiang Peng Bug: 145607449 (cherry picked commit e13cae32a425959e886fb91e83205a398285b708) Signed-off-by: Mark Salyzyn Bug: 150789066 Change-Id: I6a5d83f8e4c32f183ad2360f4b9fba586ad8e48f --- 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 18f43678ee6f..a028d2d1e4f4 100644 --- a/drivers/power/supply/power_supply_sysfs.c +++ b/drivers/power/supply/power_supply_sysfs.c @@ -499,6 +499,7 @@ static struct device_attribute power_supply_attrs[] = { POWER_SUPPLY_ATTR(charge_counter_ext), /* Properties of type `const char *' */ POWER_SUPPLY_ATTR(model_name), + POWER_SUPPLY_ATTR(ptmc_id), POWER_SUPPLY_ATTR(manufacturer), POWER_SUPPLY_ATTR(battery_type), POWER_SUPPLY_ATTR(cycle_counts), diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 3be81bcc083c..df9a68527fa4 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -364,6 +364,7 @@ enum power_supply_property { POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT, /* Properties of type `const char *' */ POWER_SUPPLY_PROP_MODEL_NAME, + POWER_SUPPLY_PROP_PTMC_ID, POWER_SUPPLY_PROP_MANUFACTURER, POWER_SUPPLY_PROP_BATTERY_TYPE, POWER_SUPPLY_PROP_CYCLE_COUNTS,