ANDROID: usb: typec: tcpm: Add vendor hook to store partner source capabilities
Add a hook after receiving the source capabilities from the partner port. Pass the address of the source capability array so that vendor code is able to access them. OOT bug: Bug: 181629276 Bug: 169215197 Bug: 271294543 Signed-off-by: Kyle Tso <kyletso@google.com> Change-Id: I11c4a7919c248690e63c3bfbebfa6b8d711175a6 (cherry picked from commit af7214914ab9ead9356652eed35004482265372d)
This commit is contained in:
parent
081a88febb
commit
c8314fcb76
3 changed files with 8 additions and 1 deletions
|
|
@ -172,4 +172,5 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_audio_usb_offload_connect);
|
|||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_audio_usb_offload_disconnect);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_typec_tcpci_override_toggling);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_typec_tcpci_get_vbus);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_typec_store_partner_src_caps);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_typec_tcpm_get_timer);
|
||||
|
|
|
|||
|
|
@ -2457,7 +2457,8 @@ static void tcpm_pd_data_request(struct tcpm_port *port,
|
|||
port->nr_source_caps);
|
||||
|
||||
tcpm_register_source_caps(port);
|
||||
|
||||
trace_android_vh_typec_store_partner_src_caps(&port->nr_source_caps,
|
||||
&port->source_caps);
|
||||
/*
|
||||
* Adjust revision in subsequent message headers, as required,
|
||||
* to comply with 6.2.1.1.5 of the USB PD 3.0 spec. We don't
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
*/
|
||||
struct tcpci;
|
||||
struct tcpci_data;
|
||||
struct tcpm_port;
|
||||
|
||||
#ifndef TYPEC_TIMER
|
||||
#define TYPEC_TIMER
|
||||
|
|
@ -41,6 +42,10 @@ DECLARE_HOOK(android_vh_typec_tcpm_get_timer,
|
|||
TP_PROTO(const char *state, enum typec_timer timer, unsigned int *msecs),
|
||||
TP_ARGS(state, timer, msecs));
|
||||
|
||||
DECLARE_HOOK(android_vh_typec_store_partner_src_caps,
|
||||
TP_PROTO(unsigned int *nr_source_caps, u32 (*source_caps)[]),
|
||||
TP_ARGS(nr_source_caps, source_caps));
|
||||
|
||||
#endif /* _TRACE_HOOK_UFSHCD_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue