Mark Brown | fb2736b | 2011-07-24 21:30:55 +0100 | [diff] [blame] | 1 | #undef TRACE_SYSTEM |
| 2 | #define TRACE_SYSTEM regmap |
| 3 | |
| 4 | #if !defined(_TRACE_REGMAP_H) || defined(TRACE_HEADER_MULTI_READ) |
| 5 | #define _TRACE_REGMAP_H |
| 6 | |
| 7 | #include <linux/device.h> |
| 8 | #include <linux/ktime.h> |
| 9 | #include <linux/tracepoint.h> |
| 10 | |
| 11 | struct regmap; |
| 12 | |
| 13 | /* |
| 14 | * Log register events |
| 15 | */ |
| 16 | DECLARE_EVENT_CLASS(regmap_reg, |
| 17 | |
| 18 | TP_PROTO(struct device *dev, unsigned int reg, |
| 19 | unsigned int val), |
| 20 | |
| 21 | TP_ARGS(dev, reg, val), |
| 22 | |
| 23 | TP_STRUCT__entry( |
| 24 | __string( name, dev_name(dev) ) |
| 25 | __field( unsigned int, reg ) |
| 26 | __field( unsigned int, val ) |
| 27 | ), |
| 28 | |
| 29 | TP_fast_assign( |
| 30 | __assign_str(name, dev_name(dev)); |
| 31 | __entry->reg = reg; |
| 32 | __entry->val = val; |
| 33 | ), |
| 34 | |
| 35 | TP_printk("%s reg=%x val=%x", __get_str(name), |
| 36 | (unsigned int)__entry->reg, |
| 37 | (unsigned int)__entry->val) |
| 38 | ); |
| 39 | |
| 40 | DEFINE_EVENT(regmap_reg, regmap_reg_write, |
| 41 | |
| 42 | TP_PROTO(struct device *dev, unsigned int reg, |
| 43 | unsigned int val), |
| 44 | |
| 45 | TP_ARGS(dev, reg, val) |
| 46 | |
| 47 | ); |
| 48 | |
| 49 | DEFINE_EVENT(regmap_reg, regmap_reg_read, |
| 50 | |
| 51 | TP_PROTO(struct device *dev, unsigned int reg, |
| 52 | unsigned int val), |
| 53 | |
| 54 | TP_ARGS(dev, reg, val) |
| 55 | |
| 56 | ); |
| 57 | |
| 58 | DECLARE_EVENT_CLASS(regmap_block, |
| 59 | |
| 60 | TP_PROTO(struct device *dev, unsigned int reg, size_t count), |
| 61 | |
| 62 | TP_ARGS(dev, reg, count), |
| 63 | |
| 64 | TP_STRUCT__entry( |
| 65 | __string( name, dev_name(dev) ) |
| 66 | __field( unsigned int, reg ) |
| 67 | __field( size_t, count ) |
| 68 | ), |
| 69 | |
| 70 | TP_fast_assign( |
| 71 | __assign_str(name, dev_name(dev)); |
| 72 | __entry->reg = reg; |
| 73 | __entry->count = count; |
| 74 | ), |
| 75 | |
| 76 | TP_printk("%s reg=%x count=%d", __get_str(name), |
| 77 | (unsigned int)__entry->reg, |
| 78 | (size_t)__entry->count) |
| 79 | ); |
| 80 | |
| 81 | DEFINE_EVENT(regmap_block, regmap_hw_read_start, |
| 82 | |
| 83 | TP_PROTO(struct device *dev, unsigned int reg, size_t count), |
| 84 | |
| 85 | TP_ARGS(dev, reg, count) |
| 86 | ); |
| 87 | |
| 88 | DEFINE_EVENT(regmap_block, regmap_hw_read_done, |
| 89 | |
| 90 | TP_PROTO(struct device *dev, unsigned int reg, size_t count), |
| 91 | |
| 92 | TP_ARGS(dev, reg, count) |
| 93 | ); |
| 94 | |
| 95 | DEFINE_EVENT(regmap_block, regmap_hw_write_start, |
| 96 | |
| 97 | TP_PROTO(struct device *dev, unsigned int reg, size_t count), |
| 98 | |
| 99 | TP_ARGS(dev, reg, count) |
| 100 | ); |
| 101 | |
| 102 | DEFINE_EVENT(regmap_block, regmap_hw_write_done, |
| 103 | |
| 104 | TP_PROTO(struct device *dev, unsigned int reg, size_t count), |
| 105 | |
| 106 | TP_ARGS(dev, reg, count) |
| 107 | ); |
| 108 | |
| 109 | #endif /* _TRACE_REGMAP_H */ |
| 110 | |
| 111 | /* This part must be outside protection */ |
| 112 | #include <trace/define_trace.h> |