From df4e0843881c7b8d76f124463e3c42c41f4b67f4 Mon Sep 17 00:00:00 2001 From: Jeehong Kim Date: Mon, 13 Jul 2020 23:42:58 +0900 Subject: [PATCH] FROMLIST: power: add "Wireless" to power_supply_type and power_supply_type_text In android platform(BatteryMonitor.cpp), SysfsStringEnumMap supplyTypeMap[] is declred for communication with kernel(sysfs) and there is "Wireless". But, no type for "Wireless" in kernel. So, we suggest to add "Wireless" to power_supply_type and power_supply_type_text to use "Wireless" on android platform. This will help ensure that text values are kept in sync with BatteryMonitor.cpp. Bug: 160750558 Signed-off-by: Do Hyoung Kim Signed-off-by: Jeehong Kim Link: https://lore.kernel.org/lkml/20200730000946.15327-1-jhez.kim@samsung.com/T/#u Change-Id: I486bef98ac785d6352370b8e9c4865ed2351f6d4 --- 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 4d6e1d5015d6..51a1383a7f23 100644 --- a/drivers/power/supply/power_supply_sysfs.c +++ b/drivers/power/supply/power_supply_sysfs.c @@ -56,6 +56,7 @@ static const char * const POWER_SUPPLY_TYPE_TEXT[] = { [POWER_SUPPLY_TYPE_USB_PD] = "USB_PD", [POWER_SUPPLY_TYPE_USB_PD_DRP] = "USB_PD_DRP", [POWER_SUPPLY_TYPE_APPLE_BRICK_ID] = "BrickID", + [POWER_SUPPLY_TYPE_WIRELESS] = "Wireless", }; static const char * const POWER_SUPPLY_USB_TYPE_TEXT[] = { diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 4dcdbfb36357..f4473c233dab 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -185,6 +185,7 @@ enum power_supply_type { POWER_SUPPLY_TYPE_USB_PD, /* Power Delivery Port */ POWER_SUPPLY_TYPE_USB_PD_DRP, /* PD Dual Role Port */ POWER_SUPPLY_TYPE_APPLE_BRICK_ID, /* Apple Charging Method */ + POWER_SUPPLY_TYPE_WIRELESS, /* Wireless */ }; enum power_supply_usb_type {