Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 11996d8

Browse files
kyletsoadlTreehugger Robot
authored andcommitted
UPSTREAM: 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 a7cff92 ("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 <kyletso@google.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20231216104630.2720818-3-kyletso@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Bug: 206108037 (cherry picked from commit cd099cd) Signed-off-by: Kyle Tso <kyletso@google.com> (cherry picked from https://android-review.googlesource.com/q/commit:eab651bc575f23415e8aa8cb39b45a92fcf8eeee) Merged-In: I58ee6e321f304b758507287ced314cc7a07466eb Change-Id: I58ee6e321f304b758507287ced314cc7a07466eb
1 parent cee1c5e commit 11996d8

File tree

1 file changed

+298
-89
lines changed

1 file changed

+298
-89
lines changed

0 commit comments

Comments
 (0)