]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
power: supply: Add PD SPR AVS support to USB type enum
authorBadhri Jagan Sridharan <badhri@google.com>
Mon, 16 Mar 2026 15:03:00 +0000 (15:03 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2026 15:08:39 +0000 (16:08 +0100)
Add two new members to the power_supply_usb_type to represent the
USB Power Delivery (PD) Standard Power Range (SPR) Adjustable Voltage
Supply (AVS) charging types:

POWER_SUPPLY_USB_TYPE_PD_SPR_AVS: For devices supporting only the
PD SPR AVS type.

POWER_SUPPLY_USB_TYPE_PD_PPS_SPR_AVS: For devices that support both
PD Programmable Power Supply (PPS) and PD SPR AVS.

Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Link: https://patch.msgid.link/20260316150301.3892223-3-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/ABI/testing/sysfs-class-power
drivers/power/supply/power_supply_sysfs.c
include/linux/power_supply.h

index 4b21d5d2325136be65126d4d1d6e64608280fe44..32697b926cc8c22f9caecd465847cd295af75a39 100644 (file)
@@ -675,7 +675,8 @@ Description:
 
                Valid values:
                              "Unknown", "SDP", "DCP", "CDP", "ACA", "C", "PD",
-                             "PD_DRP", "PD_PPS", "BrickID"
+                             "PD_DRP", "PD_PPS", "BrickID", "PD_SPR_AVS",
+                             "PD_PPS_SPR_AVS"
 
 **Device Specific Properties**
 
index dd3a48d72d2b18c0580b926ca34667474781eb61..f30a7b9ccd5e93fd5e428450bdaaf5842512b436 100644 (file)
@@ -70,6 +70,8 @@ static const char * const POWER_SUPPLY_USB_TYPE_TEXT[] = {
        [POWER_SUPPLY_USB_TYPE_PD]              = "PD",
        [POWER_SUPPLY_USB_TYPE_PD_DRP]          = "PD_DRP",
        [POWER_SUPPLY_USB_TYPE_PD_PPS]          = "PD_PPS",
+       [POWER_SUPPLY_USB_TYPE_PD_SPR_AVS]      = "PD_SPR_AVS",
+       [POWER_SUPPLY_USB_TYPE_PD_PPS_SPR_AVS]  = "PD_PPS_SPR_AVS",
        [POWER_SUPPLY_USB_TYPE_APPLE_BRICK_ID]  = "BrickID",
 };
 
index 360ffdf272dab86241f1aac4650d1a91a088a84b..7a5e4c3242a01d862b89df5d10cdf6045d117ff9 100644 (file)
@@ -210,6 +210,9 @@ enum power_supply_usb_type {
        POWER_SUPPLY_USB_TYPE_PD,               /* Power Delivery Port */
        POWER_SUPPLY_USB_TYPE_PD_DRP,           /* PD Dual Role Port */
        POWER_SUPPLY_USB_TYPE_PD_PPS,           /* PD Programmable Power Supply */
+       /* PD Standard Power Range Adjustable Voltage Supply */
+       POWER_SUPPLY_USB_TYPE_PD_SPR_AVS,
+       POWER_SUPPLY_USB_TYPE_PD_PPS_SPR_AVS,   /* Supports both PD PPS + SPR AVS */
        POWER_SUPPLY_USB_TYPE_APPLE_BRICK_ID,   /* Apple Charging Method */
 };