
"dev_name" for I2C devices won't have any value set, unless they are instantiated thru ACPI interface. As a result of this, I2C driver will assign some dynamic name in the format "%d-%04x" (e.g. 1-001f), and further this device names are used for kernel wakelocks. This dynamic names are difficult to associate with actual device and hence it will help to have an ability where vendor can assign the device name through vendor hooks. Bug: 147496295 Signed-off-by: Manish Varma <varmam@google.com> Change-Id: Idb417ef5330002063a9763544f9f0364f9581276
21 lines
531 B
C
21 lines
531 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#undef TRACE_SYSTEM
|
|
#define TRACE_SYSTEM i2c
|
|
|
|
#define TRACE_INCLUDE_PATH trace/hooks
|
|
|
|
#if !defined(_TRACE_HOOK_I2C_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define _TRACE_HOOK_I2C_H
|
|
|
|
#include <linux/tracepoint.h>
|
|
#include <trace/hooks/vendor_hooks.h>
|
|
|
|
DECLARE_HOOK(android_vh_of_i2c_get_board_info,
|
|
TP_PROTO(struct device_node *node, const char **dev_name),
|
|
TP_ARGS(node, dev_name));
|
|
|
|
#endif /* _TRACE_HOOK_I2C_H */
|
|
|
|
/* This part must be outside protection */
|
|
#include <trace/define_trace.h>
|