^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * Greybus driver and device API
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * Copyright 2015 Google Inc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * Copyright 2015 Linaro Ltd.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #undef TRACE_SYSTEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #define TRACE_SYSTEM greybus
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #if !defined(_TRACE_GREYBUS_H) || defined(TRACE_HEADER_MULTI_READ)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #define _TRACE_GREYBUS_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #include <linux/tracepoint.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) struct gb_message;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) struct gb_operation;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) struct gb_connection;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) struct gb_bundle;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) struct gb_host_device;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) DECLARE_EVENT_CLASS(gb_message,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) TP_PROTO(struct gb_message *message),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) TP_ARGS(message),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) __field(u16, size)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) __field(u16, operation_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) __field(u8, type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) __field(u8, result)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) __entry->size = le16_to_cpu(message->header->size);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) __entry->operation_id =
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) le16_to_cpu(message->header->operation_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) __entry->type = message->header->type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) __entry->result = message->header->result;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) TP_printk("size=%hu operation_id=0x%04x type=0x%02x result=0x%02x",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) __entry->size, __entry->operation_id,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) __entry->type, __entry->result)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) #define DEFINE_MESSAGE_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) DEFINE_EVENT(gb_message, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) TP_PROTO(struct gb_message *message), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) TP_ARGS(message))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) * Occurs immediately before calling a host device's message_send()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) * method.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) DEFINE_MESSAGE_EVENT(gb_message_send);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) * Occurs after an incoming request message has been received
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) DEFINE_MESSAGE_EVENT(gb_message_recv_request);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) * Occurs after an incoming response message has been received,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) * after its matching request has been found.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) DEFINE_MESSAGE_EVENT(gb_message_recv_response);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) * Occurs after an operation has been canceled, possibly before the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) * cancellation is complete.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) DEFINE_MESSAGE_EVENT(gb_message_cancel_outgoing);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) * Occurs when an incoming request is cancelled; if the response has
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) * been queued for sending, this occurs after it is sent.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) DEFINE_MESSAGE_EVENT(gb_message_cancel_incoming);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) * Occurs in the host driver message_send() function just prior to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) * handing off the data to be processed by hardware.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) DEFINE_MESSAGE_EVENT(gb_message_submit);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) #undef DEFINE_MESSAGE_EVENT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) DECLARE_EVENT_CLASS(gb_operation,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) TP_PROTO(struct gb_operation *operation),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) TP_ARGS(operation),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) __field(u16, cport_id) /* CPort of HD side of connection */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) __field(u16, id) /* Operation ID */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) __field(u8, type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) __field(unsigned long, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) __field(int, active)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) __field(int, waiters)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) __field(int, errno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) __entry->cport_id = operation->connection->hd_cport_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) __entry->id = operation->id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) __entry->type = operation->type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) __entry->flags = operation->flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) __entry->active = operation->active;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) __entry->waiters = atomic_read(&operation->waiters);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) __entry->errno = operation->errno;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) TP_printk("id=%04x type=0x%02x cport_id=%04x flags=0x%lx active=%d waiters=%d errno=%d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) __entry->id, __entry->cport_id, __entry->type, __entry->flags,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) __entry->active, __entry->waiters, __entry->errno)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) #define DEFINE_OPERATION_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) DEFINE_EVENT(gb_operation, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) TP_PROTO(struct gb_operation *operation), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) TP_ARGS(operation))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) * Occurs after a new operation is created for an outgoing request
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) * has been successfully created.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) DEFINE_OPERATION_EVENT(gb_operation_create);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) * Occurs after a new core operation has been created.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) DEFINE_OPERATION_EVENT(gb_operation_create_core);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) * Occurs after a new operation has been created for an incoming
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) * request has been successfully created and initialized.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) DEFINE_OPERATION_EVENT(gb_operation_create_incoming);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) * Occurs when the last reference to an operation has been dropped,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) * prior to freeing resources.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) DEFINE_OPERATION_EVENT(gb_operation_destroy);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) * Occurs when an operation has been marked active, after updating
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) * its active count.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) DEFINE_OPERATION_EVENT(gb_operation_get_active);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) * Occurs when an operation has been marked active, before updating
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) * its active count.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) DEFINE_OPERATION_EVENT(gb_operation_put_active);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) #undef DEFINE_OPERATION_EVENT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) DECLARE_EVENT_CLASS(gb_connection,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) TP_PROTO(struct gb_connection *connection),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) TP_ARGS(connection),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) __field(int, hd_bus_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) __field(u8, bundle_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) /* name contains "hd_cport_id/intf_id:cport_id" */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) __dynamic_array(char, name, sizeof(connection->name))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) __field(enum gb_connection_state, state)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) __field(unsigned long, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) __entry->hd_bus_id = connection->hd->bus_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) __entry->bundle_id = connection->bundle ?
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) connection->bundle->id : BUNDLE_ID_NONE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) memcpy(__get_str(name), connection->name,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) sizeof(connection->name));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) __entry->state = connection->state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) __entry->flags = connection->flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) TP_printk("hd_bus_id=%d bundle_id=0x%02x name=\"%s\" state=%u flags=0x%lx",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) __entry->hd_bus_id, __entry->bundle_id, __get_str(name),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) (unsigned int)__entry->state, __entry->flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) #define DEFINE_CONNECTION_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) DEFINE_EVENT(gb_connection, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) TP_PROTO(struct gb_connection *connection), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) TP_ARGS(connection))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) * Occurs after a new connection is successfully created.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) DEFINE_CONNECTION_EVENT(gb_connection_create);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) * Occurs when the last reference to a connection has been dropped,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) * before its resources are freed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) DEFINE_CONNECTION_EVENT(gb_connection_release);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) * Occurs when a new reference to connection is added, currently
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) * only when a message over the connection is received.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) DEFINE_CONNECTION_EVENT(gb_connection_get);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) * Occurs when a new reference to connection is dropped, after a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) * a received message is handled, or when the connection is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) * destroyed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) DEFINE_CONNECTION_EVENT(gb_connection_put);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) * Occurs when a request to enable a connection is made, either for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) * transmit only, or for both transmit and receive.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) DEFINE_CONNECTION_EVENT(gb_connection_enable);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) * Occurs when a request to disable a connection is made, either for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) * receive only, or for both transmit and receive. Also occurs when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) * a request to forcefully disable a connection is made.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) DEFINE_CONNECTION_EVENT(gb_connection_disable);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) #undef DEFINE_CONNECTION_EVENT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) DECLARE_EVENT_CLASS(gb_bundle,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) TP_PROTO(struct gb_bundle *bundle),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) TP_ARGS(bundle),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) __field(u8, intf_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) __field(u8, id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) __field(u8, class)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) __field(size_t, num_cports)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) __entry->intf_id = bundle->intf->interface_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) __entry->id = bundle->id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) __entry->class = bundle->class;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) __entry->num_cports = bundle->num_cports;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) TP_printk("intf_id=0x%02x id=%02x class=0x%02x num_cports=%zu",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) __entry->intf_id, __entry->id, __entry->class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) __entry->num_cports)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) #define DEFINE_BUNDLE_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) DEFINE_EVENT(gb_bundle, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) TP_PROTO(struct gb_bundle *bundle), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) TP_ARGS(bundle))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) * Occurs after a new bundle is successfully created.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) DEFINE_BUNDLE_EVENT(gb_bundle_create);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) * Occurs when the last reference to a bundle has been dropped,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) * before its resources are freed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) DEFINE_BUNDLE_EVENT(gb_bundle_release);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) * Occurs when a bundle is added to an interface when the interface
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) * is enabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) DEFINE_BUNDLE_EVENT(gb_bundle_add);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) * Occurs when a registered bundle gets destroyed, normally at the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) * time an interface is disabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) DEFINE_BUNDLE_EVENT(gb_bundle_destroy);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) #undef DEFINE_BUNDLE_EVENT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) DECLARE_EVENT_CLASS(gb_interface,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) TP_PROTO(struct gb_interface *intf),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) TP_ARGS(intf),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) __field(u8, module_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) __field(u8, id) /* Interface id */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) __field(u8, device_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) __field(int, disconnected) /* bool */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) __field(int, ejected) /* bool */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) __field(int, active) /* bool */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) __field(int, enabled) /* bool */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) __field(int, mode_switch) /* bool */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) __entry->module_id = intf->module->module_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) __entry->id = intf->interface_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) __entry->device_id = intf->device_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) __entry->disconnected = intf->disconnected;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) __entry->ejected = intf->ejected;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) __entry->active = intf->active;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) __entry->enabled = intf->enabled;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) __entry->mode_switch = intf->mode_switch;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) TP_printk("intf_id=%hhu device_id=%hhu module_id=%hhu D=%d J=%d A=%d E=%d M=%d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) __entry->id, __entry->device_id, __entry->module_id,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) __entry->disconnected, __entry->ejected, __entry->active,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) __entry->enabled, __entry->mode_switch)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) #define DEFINE_INTERFACE_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) DEFINE_EVENT(gb_interface, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) TP_PROTO(struct gb_interface *intf), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) TP_ARGS(intf))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) * Occurs after a new interface is successfully created.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) DEFINE_INTERFACE_EVENT(gb_interface_create);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) * Occurs after the last reference to an interface has been dropped.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) DEFINE_INTERFACE_EVENT(gb_interface_release);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) * Occurs after an interface been registerd.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) DEFINE_INTERFACE_EVENT(gb_interface_add);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) * Occurs when a registered interface gets deregisterd.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) DEFINE_INTERFACE_EVENT(gb_interface_del);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) * Occurs when a registered interface has been successfully
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) * activated.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) DEFINE_INTERFACE_EVENT(gb_interface_activate);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) * Occurs when an activated interface is being deactivated.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) DEFINE_INTERFACE_EVENT(gb_interface_deactivate);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) * Occurs when an interface has been successfully enabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) DEFINE_INTERFACE_EVENT(gb_interface_enable);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) * Occurs when an enabled interface is being disabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) DEFINE_INTERFACE_EVENT(gb_interface_disable);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) #undef DEFINE_INTERFACE_EVENT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) DECLARE_EVENT_CLASS(gb_module,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) TP_PROTO(struct gb_module *module),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) TP_ARGS(module),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) __field(int, hd_bus_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) __field(u8, module_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) __field(size_t, num_interfaces)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) __field(int, disconnected) /* bool */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387) TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) __entry->hd_bus_id = module->hd->bus_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) __entry->module_id = module->module_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390) __entry->num_interfaces = module->num_interfaces;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) __entry->disconnected = module->disconnected;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) TP_printk("hd_bus_id=%d module_id=%hhu num_interfaces=%zu disconnected=%d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) __entry->hd_bus_id, __entry->module_id,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) __entry->num_interfaces, __entry->disconnected)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) #define DEFINE_MODULE_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) DEFINE_EVENT(gb_module, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) TP_PROTO(struct gb_module *module), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) TP_ARGS(module))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405) * Occurs after a new module is successfully created, before
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) * creating any of its interfaces.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408) DEFINE_MODULE_EVENT(gb_module_create);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411) * Occurs after the last reference to a module has been dropped.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) DEFINE_MODULE_EVENT(gb_module_release);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416) * Occurs after a module is successfully created, before registering
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417) * any of its interfaces.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) DEFINE_MODULE_EVENT(gb_module_add);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) * Occurs when a module is deleted, before deregistering its
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423) * interfaces.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) DEFINE_MODULE_EVENT(gb_module_del);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427) #undef DEFINE_MODULE_EVENT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429) DECLARE_EVENT_CLASS(gb_host_device,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431) TP_PROTO(struct gb_host_device *hd),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433) TP_ARGS(hd),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435) TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436) __field(int, bus_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437) __field(size_t, num_cports)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438) __field(size_t, buffer_size_max)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441) TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442) __entry->bus_id = hd->bus_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443) __entry->num_cports = hd->num_cports;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444) __entry->buffer_size_max = hd->buffer_size_max;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445) ),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447) TP_printk("bus_id=%d num_cports=%zu mtu=%zu",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 448) __entry->bus_id, __entry->num_cports,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 449) __entry->buffer_size_max)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 450) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 451)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 452) #define DEFINE_HD_EVENT(name) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 453) DEFINE_EVENT(gb_host_device, name, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 454) TP_PROTO(struct gb_host_device *hd), \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 455) TP_ARGS(hd))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 456)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 457) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 458) * Occurs after a new host device is successfully created, before
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 459) * its SVC has been set up.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 460) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 461) DEFINE_HD_EVENT(gb_hd_create);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 462)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 463) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 464) * Occurs after the last reference to a host device has been
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 465) * dropped.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 466) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 467) DEFINE_HD_EVENT(gb_hd_release);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 468)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 469) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 470) * Occurs after a new host device has been added, after the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 471) * connection to its SVC has been enabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 472) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 473) DEFINE_HD_EVENT(gb_hd_add);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 474)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 475) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 476) * Occurs when a host device is being disconnected from the AP USB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 477) * host controller.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 478) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 479) DEFINE_HD_EVENT(gb_hd_del);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 480)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 481) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 482) * Occurs when a host device has passed received data to the Greybus
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 483) * core, after it has been determined it is destined for a valid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 484) * CPort.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 485) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 486) DEFINE_HD_EVENT(gb_hd_in);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 487)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 488) #undef DEFINE_HD_EVENT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 489)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 490) #endif /* _TRACE_GREYBUS_H */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 491)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 492) /* This part must be outside protection */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 493) #undef TRACE_INCLUDE_PATH
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 494) #define TRACE_INCLUDE_PATH .
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 495)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 496) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 497) * TRACE_INCLUDE_FILE is not needed if the filename and TRACE_SYSTEM are equal
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 498) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 499) #undef TRACE_INCLUDE_FILE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 500) #define TRACE_INCLUDE_FILE greybus_trace
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 501) #include <trace/define_trace.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 502)