2011-07-24 14:30:55 -06:00
|
|
|
#undef TRACE_SYSTEM
|
|
|
|
#define TRACE_SYSTEM regmap
|
|
|
|
|
|
|
|
#if !defined(_TRACE_REGMAP_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
|
|
#define _TRACE_REGMAP_H
|
|
|
|
|
|
|
|
#include <linux/ktime.h>
|
|
|
|
#include <linux/tracepoint.h>
|
|
|
|
|
2012-01-30 09:46:54 -07:00
|
|
|
struct device;
|
2011-07-24 14:30:55 -06:00
|
|
|
struct regmap;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Log register events
|
|
|
|
*/
|
|
|
|
DECLARE_EVENT_CLASS(regmap_reg,
|
|
|
|
|
|
|
|
TP_PROTO(struct device *dev, unsigned int reg,
|
|
|
|
unsigned int val),
|
|
|
|
|
|
|
|
TP_ARGS(dev, reg, val),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__string( name, dev_name(dev) )
|
|
|
|
__field( unsigned int, reg )
|
|
|
|
__field( unsigned int, val )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__assign_str(name, dev_name(dev));
|
|
|
|
__entry->reg = reg;
|
|
|
|
__entry->val = val;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("%s reg=%x val=%x", __get_str(name),
|
|
|
|
(unsigned int)__entry->reg,
|
|
|
|
(unsigned int)__entry->val)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(regmap_reg, regmap_reg_write,
|
|
|
|
|
|
|
|
TP_PROTO(struct device *dev, unsigned int reg,
|
|
|
|
unsigned int val),
|
|
|
|
|
|
|
|
TP_ARGS(dev, reg, val)
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(regmap_reg, regmap_reg_read,
|
|
|
|
|
|
|
|
TP_PROTO(struct device *dev, unsigned int reg,
|
|
|
|
unsigned int val),
|
|
|
|
|
|
|
|
TP_ARGS(dev, reg, val)
|
|
|
|
|
|
|
|
);
|
|
|
|
|
2011-11-30 07:27:08 -07:00
|
|
|
DEFINE_EVENT(regmap_reg, regmap_reg_read_cache,
|
|
|
|
|
|
|
|
TP_PROTO(struct device *dev, unsigned int reg,
|
|
|
|
unsigned int val),
|
|
|
|
|
|
|
|
TP_ARGS(dev, reg, val)
|
|
|
|
|
|
|
|
);
|
|
|
|
|
2011-07-24 14:30:55 -06:00
|
|
|
DECLARE_EVENT_CLASS(regmap_block,
|
|
|
|
|
2011-08-09 01:42:27 -06:00
|
|
|
TP_PROTO(struct device *dev, unsigned int reg, int count),
|
2011-07-24 14:30:55 -06:00
|
|
|
|
|
|
|
TP_ARGS(dev, reg, count),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__string( name, dev_name(dev) )
|
|
|
|
__field( unsigned int, reg )
|
2011-08-09 01:42:27 -06:00
|
|
|
__field( int, count )
|
2011-07-24 14:30:55 -06:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__assign_str(name, dev_name(dev));
|
|
|
|
__entry->reg = reg;
|
|
|
|
__entry->count = count;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("%s reg=%x count=%d", __get_str(name),
|
|
|
|
(unsigned int)__entry->reg,
|
2011-08-09 01:42:27 -06:00
|
|
|
(int)__entry->count)
|
2011-07-24 14:30:55 -06:00
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(regmap_block, regmap_hw_read_start,
|
|
|
|
|
2011-08-09 01:42:27 -06:00
|
|
|
TP_PROTO(struct device *dev, unsigned int reg, int count),
|
2011-07-24 14:30:55 -06:00
|
|
|
|
|
|
|
TP_ARGS(dev, reg, count)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(regmap_block, regmap_hw_read_done,
|
|
|
|
|
2011-08-09 01:42:27 -06:00
|
|
|
TP_PROTO(struct device *dev, unsigned int reg, int count),
|
2011-07-24 14:30:55 -06:00
|
|
|
|
|
|
|
TP_ARGS(dev, reg, count)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(regmap_block, regmap_hw_write_start,
|
|
|
|
|
2011-08-09 01:42:27 -06:00
|
|
|
TP_PROTO(struct device *dev, unsigned int reg, int count),
|
2011-07-24 14:30:55 -06:00
|
|
|
|
|
|
|
TP_ARGS(dev, reg, count)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(regmap_block, regmap_hw_write_done,
|
|
|
|
|
2011-08-09 01:42:27 -06:00
|
|
|
TP_PROTO(struct device *dev, unsigned int reg, int count),
|
2011-07-24 14:30:55 -06:00
|
|
|
|
|
|
|
TP_ARGS(dev, reg, count)
|
|
|
|
);
|
|
|
|
|
2011-09-19 07:34:04 -06:00
|
|
|
TRACE_EVENT(regcache_sync,
|
|
|
|
|
|
|
|
TP_PROTO(struct device *dev, const char *type,
|
|
|
|
const char *status),
|
|
|
|
|
|
|
|
TP_ARGS(dev, type, status),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__string( name, dev_name(dev) )
|
|
|
|
__string( status, status )
|
|
|
|
__string( type, type )
|
|
|
|
__field( int, type )
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__assign_str(name, dev_name(dev));
|
|
|
|
__assign_str(status, status);
|
|
|
|
__assign_str(type, type);
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("%s type=%s status=%s", __get_str(name),
|
|
|
|
__get_str(type), __get_str(status))
|
|
|
|
);
|
|
|
|
|
2011-07-24 14:30:55 -06:00
|
|
|
#endif /* _TRACE_REGMAP_H */
|
|
|
|
|
|
|
|
/* This part must be outside protection */
|
|
|
|
#include <trace/define_trace.h>
|