]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
usb: typec: ucsi: Add support for READ_POWER_LEVEL command
authorVenkat Jayaraman <venkat.jayaraman@intel.com>
Thu, 14 Aug 2025 16:30:28 +0000 (09:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Aug 2025 10:16:18 +0000 (12:16 +0200)
commitc851b71fd6cdbf3000bf0a2354592a0f09db3ba3
treeea73e486162c406bf376f4f73db74d1f7347824d
parentc0485e864a2eaa1d5a84c71e573dd236d0e885ae
usb: typec: ucsi: Add support for READ_POWER_LEVEL command

Add support for UCSI READ_POWER_LEVEL command as per
UCSI specification v2.1 and above to debugfs.

Following power related fields will be exposed as files in debugfs:-
peak_current (Peak current),
avg_current (Average current) and
vbus_voltage (VBUS voltage)

These files will be updated either when a READ_POWER_LEVEL
command is sent from OS or when a device is connected.

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Venkat Jayaraman <venkat.jayaraman@intel.com>
Link: https://lore.kernel.org/r/20250814163028.18058-1-venkat.jayaraman@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/debugfs.c
drivers/usb/typec/ucsi/ucsi.c
drivers/usb/typec/ucsi/ucsi.h