Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

power: supply: add wireless type

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>

authored by

Subbaraman Narayanamurthy and committed by
Sebastian Reichel
5ca937fb 99298de5

+3 -1
+1 -1
Documentation/ABI/testing/sysfs-class-power
··· 34 34 Describes the main type of the supply. 35 35 36 36 Access: Read 37 - Valid values: "Battery", "UPS", "Mains", "USB" 37 + Valid values: "Battery", "UPS", "Mains", "USB", "Wireless" 38 38 39 39 ===== Battery Properties ===== 40 40
+1
drivers/power/supply/power_supply_sysfs.c
··· 56 56 [POWER_SUPPLY_TYPE_USB_PD] = "USB_PD", 57 57 [POWER_SUPPLY_TYPE_USB_PD_DRP] = "USB_PD_DRP", 58 58 [POWER_SUPPLY_TYPE_APPLE_BRICK_ID] = "BrickID", 59 + [POWER_SUPPLY_TYPE_WIRELESS] = "Wireless", 59 60 }; 60 61 61 62 static const char * const POWER_SUPPLY_USB_TYPE_TEXT[] = {
+1
include/linux/power_supply.h
··· 186 186 POWER_SUPPLY_TYPE_USB_PD, /* Power Delivery Port */ 187 187 POWER_SUPPLY_TYPE_USB_PD_DRP, /* PD Dual Role Port */ 188 188 POWER_SUPPLY_TYPE_APPLE_BRICK_ID, /* Apple Charging Method */ 189 + POWER_SUPPLY_TYPE_WIRELESS, /* Wireless */ 189 190 }; 190 191 191 192 enum power_supply_usb_type {