Add vendor hook when core detect a new device. Vendor side can use this hook to do several things. Our Unisoc ASIC had some drawback. most scene, we use DWC3 controller and associated PHY, when digital headset plug in, we need end the enumeration and switch to another controller and phy. Using this hook, we can do the switch easily and efficiently. Bug: 229330749 Change-Id: I1cba28b43ff1b1f5ac0138c0bb743f3d8e9f1e4b Signed-off-by: Yunxian He <yunxian.he@unisoc.com>
20 lines
659 B
C
20 lines
659 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#undef TRACE_SYSTEM
|
|
#define TRACE_SYSTEM usb
|
|
#undef TRACE_INCLUDE_PATH
|
|
#define TRACE_INCLUDE_PATH trace/hooks
|
|
#if !defined(_TRACE_HOOK_USB_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define _TRACE_HOOK_USB_H
|
|
#include <trace/hooks/vendor_hooks.h>
|
|
/*
|
|
* Following tracepoints are not exported in tracefs and provide a
|
|
* mechanism for vendor modules to hook and extend functionality
|
|
*/
|
|
struct usb_device;
|
|
DECLARE_HOOK(android_vh_usb_new_device_added,
|
|
TP_PROTO(struct usb_device *udev, int *err),
|
|
TP_ARGS(udev, err));
|
|
#endif /* _TRACE_HOOK_USB_H */
|
|
/* This part must be outside protection */
|
|
#include <trace/define_trace.h>
|