]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
usb: typec: pd: Register SPR AVS caps with usb_power_delivery class
authorBadhri Jagan Sridharan <badhri@google.com>
Wed, 15 Oct 2025 04:30:14 +0000 (04:30 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Oct 2025 08:58:31 +0000 (10:58 +0200)
commitb4528e1dbe679bd9c0457bd263456a60859f8161
treef7f9f5a05f83ddc95dbd716b324f9e3ce0020061
parentf82890c98f3e3fd61983e9021354c632ecd47427
usb: typec: pd: Register SPR AVS caps with usb_power_delivery class

usb_power_delivery class will now display AVS cap as
`spr_adjustable_voltage_supply`. `maximum_current_9V_to_15V` and
`maximum_current_15V_to_20V` shows the corresponding current limits
in mA. `peak_current` follows the same convention as fixed_supply
where the value reported in the capabilities message is displayed
as is.

Sample output with an SPR AVS capable PD charger:
$cat /sys/class/usb_power_delivery/pd1/source-capabilities/5:spr_adjustable_voltage_supply/maximum_current_9V_to_15V
4000mA

$cat /sys/class/usb_power_delivery/pd1/source-capabilities/5:spr_adjustable_voltage_supply/maximum_current_15V_to_20V
3350mA

$cat /sys/class/usb_power_delivery/pd1/source-capabilities/5:spr_adjustable_voltage_supply/peak_current
0

Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://patch.msgid.link/20251015043017.3382908-2-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/ABI/testing/sysfs-class-usb_power_delivery
drivers/usb/typec/pd.c