gpio: rcar: Fix runtime PM imbalance on error
[linux/fpc-iii.git] / drivers / platform / chrome / cros_ec_trace.h
blobe9fb05f89ef072d3ca468b7ef72339faa9dd1378
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Trace events for the ChromeOS Embedded Controller
5 * Copyright 2019 Google LLC.
6 */
8 #undef TRACE_SYSTEM
9 #define TRACE_SYSTEM cros_ec
11 #if !defined(_CROS_EC_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ)
12 #define _CROS_EC_TRACE_H_
14 #include <linux/bits.h>
15 #include <linux/types.h>
16 #include <linux/platform_data/cros_ec_commands.h>
17 #include <linux/platform_data/cros_ec_proto.h>
19 #include <linux/tracepoint.h>
21 TRACE_EVENT(cros_ec_request_start,
22 TP_PROTO(struct cros_ec_command *cmd),
23 TP_ARGS(cmd),
24 TP_STRUCT__entry(
25 __field(uint32_t, version)
26 __field(uint32_t, command)
28 TP_fast_assign(
29 __entry->version = cmd->version;
30 __entry->command = cmd->command;
32 TP_printk("version: %u, command: %s", __entry->version,
33 __print_symbolic(__entry->command, EC_CMDS))
36 TRACE_EVENT(cros_ec_request_done,
37 TP_PROTO(struct cros_ec_command *cmd, int retval),
38 TP_ARGS(cmd, retval),
39 TP_STRUCT__entry(
40 __field(uint32_t, version)
41 __field(uint32_t, command)
42 __field(uint32_t, result)
43 __field(int, retval)
45 TP_fast_assign(
46 __entry->version = cmd->version;
47 __entry->command = cmd->command;
48 __entry->result = cmd->result;
49 __entry->retval = retval;
51 TP_printk("version: %u, command: %s, ec result: %s, retval: %d",
52 __entry->version,
53 __print_symbolic(__entry->command, EC_CMDS),
54 __print_symbolic(__entry->result, EC_RESULT),
55 __entry->retval)
59 #endif /* _CROS_EC_TRACE_H_ */
61 /* this part must be outside header guard */
63 #undef TRACE_INCLUDE_PATH
64 #define TRACE_INCLUDE_PATH .
66 #undef TRACE_INCLUDE_FILE
67 #define TRACE_INCLUDE_FILE cros_ec_trace
69 #include <trace/define_trace.h>