]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
power: supply: add wireless type
authorSubbaraman Narayanamurthy <subbaram@codeaurora.org>
Thu, 13 Aug 2020 18:34:08 +0000 (11:34 -0700)
committerSebastian Reichel <sre@kernel.org>
Wed, 26 Aug 2020 14:53:26 +0000 (16:53 +0200)
Currently, power_supply framework supports only Battery, UPS,
Mains and USB power_supply_type. Add wireless power_supply_type
so that the drivers which supports wireless can register a power
supply class device with POWER_SUPPLY_TYPE_WIRELESS.

Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Documentation/ABI/testing/sysfs-class-power
drivers/power/supply/power_supply_sysfs.c
include/linux/power_supply.h

index 40213c73bc9c45388085367c062b933adbfce163..651599fb18f8d5e9660a6953ef1e62ee86ecd0aa 100644 (file)
@@ -34,7 +34,7 @@ Description:
                Describes the main type of the supply.
 
                Access: Read
-               Valid values: "Battery", "UPS", "Mains", "USB"
+               Valid values: "Battery", "UPS", "Mains", "USB", "Wireless"
 
 ===== Battery Properties =====
 
index 3d383086018c5b69c5e17f0c353f34f4fc837e3e..a616b9d8f43c5550c3e62550b15ac77593a5cfa5 100644 (file)
@@ -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[] = {
index d0684362a392dabfe57bdbee4204cae6c81fbae9..81a55e974feb18f178a83d55fcfaa0972d716bad 100644 (file)
@@ -186,6 +186,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 {