Path: blob/master/include/trace/events/fsi_master_i2cr.h
26282 views
/* SPDX-License-Identifier: GPL-2.0-or-later */12#undef TRACE_SYSTEM3#define TRACE_SYSTEM fsi_master_i2cr45#if !defined(_TRACE_FSI_MASTER_I2CR_H) || defined(TRACE_HEADER_MULTI_READ)6#define _TRACE_FSI_MASTER_I2CR_H78#include <linux/tracepoint.h>910TRACE_EVENT(i2cr_i2c_error,11TP_PROTO(const struct i2c_client *client, uint32_t command, int rc),12TP_ARGS(client, command, rc),13TP_STRUCT__entry(14__field(int, bus)15__field(int, rc)16__array(unsigned char, command, sizeof(uint32_t))17__field(unsigned short, addr)18),19TP_fast_assign(20__entry->bus = client->adapter->nr;21__entry->rc = rc;22memcpy(__entry->command, &command, sizeof(uint32_t));23__entry->addr = client->addr;24),25TP_printk("%d-%02x command:{ %*ph } rc:%d", __entry->bus, __entry->addr,26(int)sizeof(uint32_t), __entry->command, __entry->rc)27);2829TRACE_EVENT(i2cr_read,30TP_PROTO(const struct i2c_client *client, uint32_t command, uint64_t *data),31TP_ARGS(client, command, data),32TP_STRUCT__entry(33__field(int, bus)34__array(unsigned char, data, sizeof(uint64_t))35__array(unsigned char, command, sizeof(uint32_t))36__field(unsigned short, addr)37),38TP_fast_assign(39__entry->bus = client->adapter->nr;40memcpy(__entry->data, data, sizeof(uint64_t));41memcpy(__entry->command, &command, sizeof(uint32_t));42__entry->addr = client->addr;43),44TP_printk("%d-%02x command:{ %*ph } { %*ph }", __entry->bus, __entry->addr,45(int)sizeof(uint32_t), __entry->command, (int)sizeof(uint64_t), __entry->data)46);4748TRACE_EVENT(i2cr_status,49TP_PROTO(const struct i2c_client *client, uint64_t status),50TP_ARGS(client, status),51TP_STRUCT__entry(52__field(uint64_t, status)53__field(int, bus)54__field(unsigned short, addr)55),56TP_fast_assign(57__entry->status = status;58__entry->bus = client->adapter->nr;59__entry->addr = client->addr;60),61TP_printk("%d-%02x %016llx", __entry->bus, __entry->addr, __entry->status)62);6364TRACE_EVENT(i2cr_status_error,65TP_PROTO(const struct i2c_client *client, uint64_t status, uint64_t error, uint64_t log),66TP_ARGS(client, status, error, log),67TP_STRUCT__entry(68__field(uint64_t, error)69__field(uint64_t, log)70__field(uint64_t, status)71__field(int, bus)72__field(unsigned short, addr)73),74TP_fast_assign(75__entry->error = error;76__entry->log = log;77__entry->status = status;78__entry->bus = client->adapter->nr;79__entry->addr = client->addr;80),81TP_printk("%d-%02x status:%016llx error:%016llx log:%016llx", __entry->bus, __entry->addr,82__entry->status, __entry->error, __entry->log)83);8485TRACE_EVENT(i2cr_write,86TP_PROTO(const struct i2c_client *client, uint32_t command, uint64_t data),87TP_ARGS(client, command, data),88TP_STRUCT__entry(89__field(int, bus)90__array(unsigned char, data, sizeof(uint64_t))91__array(unsigned char, command, sizeof(uint32_t))92__field(unsigned short, addr)93),94TP_fast_assign(95__entry->bus = client->adapter->nr;96memcpy(__entry->data, &data, sizeof(uint64_t));97memcpy(__entry->command, &command, sizeof(uint32_t));98__entry->addr = client->addr;99),100TP_printk("%d-%02x command:{ %*ph } { %*ph }", __entry->bus, __entry->addr,101(int)sizeof(uint32_t), __entry->command, (int)sizeof(uint64_t), __entry->data)102);103104#endif105106#include <trace/define_trace.h>107108109