aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/cdns3/cdns3-gadget.c
diff options
context:
space:
mode:
authorKyle Tso <[email protected]>2023-12-16 10:46:30 +0000
committerGreg Kroah-Hartman <[email protected]>2024-01-04 15:00:23 +0000
commitcd099cde4ed264403b434d8344994f97ac2a4349 (patch)
tree328e671f669b2e4973dae394166beb4c5dc9f7b3 /drivers/usb/cdns3/cdns3-gadget.c
parentdt-bindings: connector: Add child nodes for multiple PD capabilities (diff)
downloadkernel-cd099cde4ed264403b434d8344994f97ac2a4349.tar.gz
kernel-cd099cde4ed264403b434d8344994f97ac2a4349.zip
usb: typec: tcpm: Support multiple capabilities
Refactor tcpm_fw_get_caps to support the multiple pd capabilities got from fwnode. For backward compatibility, the original single capability is still applicable. The fetched data is stored in the newly defined structure "pd_data" and there is an array "pd_list" to store the pointers to them. A dedicated array "pds" is used to store the handles of the registered usb_power_delivery instances. Also implement the .pd_get and .pd_set ops which are introduced in commit a7cff92f0635 ("usb: typec: USB Power Delivery helpers for ports and partners"). Once the .pd_set is called, the current capability will be updated and state machine will re-negotiate the power contract if possible. Signed-off-by: Kyle Tso <[email protected]> Reviewed-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-gadget.c')
0 files changed, 0 insertions, 0 deletions