2011-07-25 03:30:55 +07: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>
|
|
|
|
|
2015-03-20 04:50:47 +07:00
|
|
|
#include "internal.h"
|
2011-07-25 03:30:55 +07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Log register events
|
|
|
|
*/
|
|
|
|
DECLARE_EVENT_CLASS(regmap_reg,
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_PROTO(struct regmap *map, unsigned int reg,
|
2011-07-25 03:30:55 +07:00
|
|
|
unsigned int val),
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_ARGS(map, reg, val),
|
2011-07-25 03:30:55 +07:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2015-03-09 18:20:13 +07:00
|
|
|
__string( name, regmap_name(map) )
|
|
|
|
__field( unsigned int, reg )
|
|
|
|
__field( unsigned int, val )
|
2011-07-25 03:30:55 +07:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2015-03-09 18:20:13 +07:00
|
|
|
__assign_str(name, regmap_name(map));
|
2011-07-25 03:30:55 +07:00
|
|
|
__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,
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_PROTO(struct regmap *map, unsigned int reg,
|
2011-07-25 03:30:55 +07:00
|
|
|
unsigned int val),
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_ARGS(map, reg, val)
|
2011-07-25 03:30:55 +07:00
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(regmap_reg, regmap_reg_read,
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_PROTO(struct regmap *map, unsigned int reg,
|
2011-07-25 03:30:55 +07:00
|
|
|
unsigned int val),
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_ARGS(map, reg, val)
|
2011-07-25 03:30:55 +07:00
|
|
|
|
|
|
|
);
|
|
|
|
|
2011-11-30 21:27:08 +07:00
|
|
|
DEFINE_EVENT(regmap_reg, regmap_reg_read_cache,
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_PROTO(struct regmap *map, unsigned int reg,
|
2011-11-30 21:27:08 +07:00
|
|
|
unsigned int val),
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_ARGS(map, reg, val)
|
2011-11-30 21:27:08 +07:00
|
|
|
|
|
|
|
);
|
|
|
|
|
2011-07-25 03:30:55 +07:00
|
|
|
DECLARE_EVENT_CLASS(regmap_block,
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_PROTO(struct regmap *map, unsigned int reg, int count),
|
2011-07-25 03:30:55 +07:00
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_ARGS(map, reg, count),
|
2011-07-25 03:30:55 +07:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2015-03-09 18:20:13 +07:00
|
|
|
__string( name, regmap_name(map) )
|
|
|
|
__field( unsigned int, reg )
|
|
|
|
__field( int, count )
|
2011-07-25 03:30:55 +07:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2015-03-09 18:20:13 +07:00
|
|
|
__assign_str(name, regmap_name(map));
|
2011-07-25 03:30:55 +07:00
|
|
|
__entry->reg = reg;
|
|
|
|
__entry->count = count;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("%s reg=%x count=%d", __get_str(name),
|
|
|
|
(unsigned int)__entry->reg,
|
2011-08-09 14:42:27 +07:00
|
|
|
(int)__entry->count)
|
2011-07-25 03:30:55 +07:00
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(regmap_block, regmap_hw_read_start,
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_PROTO(struct regmap *map, unsigned int reg, int count),
|
2011-07-25 03:30:55 +07:00
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_ARGS(map, reg, count)
|
2011-07-25 03:30:55 +07:00
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(regmap_block, regmap_hw_read_done,
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_PROTO(struct regmap *map, unsigned int reg, int count),
|
2011-07-25 03:30:55 +07:00
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_ARGS(map, reg, count)
|
2011-07-25 03:30:55 +07:00
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(regmap_block, regmap_hw_write_start,
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_PROTO(struct regmap *map, unsigned int reg, int count),
|
2011-07-25 03:30:55 +07:00
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_ARGS(map, reg, count)
|
2011-07-25 03:30:55 +07:00
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(regmap_block, regmap_hw_write_done,
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_PROTO(struct regmap *map, unsigned int reg, int count),
|
2011-07-25 03:30:55 +07:00
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_ARGS(map, reg, count)
|
2011-07-25 03:30:55 +07:00
|
|
|
);
|
|
|
|
|
2011-09-19 20:34:04 +07:00
|
|
|
TRACE_EVENT(regcache_sync,
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_PROTO(struct regmap *map, const char *type,
|
2011-09-19 20:34:04 +07:00
|
|
|
const char *status),
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_ARGS(map, type, status),
|
2011-09-19 20:34:04 +07:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2015-03-09 18:20:13 +07:00
|
|
|
__string( name, regmap_name(map) )
|
|
|
|
__string( status, status )
|
|
|
|
__string( type, type )
|
|
|
|
__field( int, type )
|
2011-09-19 20:34:04 +07:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2015-03-09 18:20:13 +07:00
|
|
|
__assign_str(name, regmap_name(map));
|
2011-09-19 20:34:04 +07:00
|
|
|
__assign_str(status, status);
|
|
|
|
__assign_str(type, type);
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("%s type=%s status=%s", __get_str(name),
|
|
|
|
__get_str(type), __get_str(status))
|
|
|
|
);
|
|
|
|
|
2012-02-24 05:02:57 +07:00
|
|
|
DECLARE_EVENT_CLASS(regmap_bool,
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_PROTO(struct regmap *map, bool flag),
|
2012-02-24 05:02:57 +07:00
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_ARGS(map, flag),
|
2012-02-24 05:02:57 +07:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2015-03-09 18:20:13 +07:00
|
|
|
__string( name, regmap_name(map) )
|
|
|
|
__field( int, flag )
|
2012-02-24 05:02:57 +07:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2015-03-09 18:20:13 +07:00
|
|
|
__assign_str(name, regmap_name(map));
|
2012-02-24 05:02:57 +07:00
|
|
|
__entry->flag = flag;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("%s flag=%d", __get_str(name),
|
|
|
|
(int)__entry->flag)
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(regmap_bool, regmap_cache_only,
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_PROTO(struct regmap *map, bool flag),
|
2012-02-24 05:02:57 +07:00
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_ARGS(map, flag)
|
2012-02-24 05:02:57 +07:00
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(regmap_bool, regmap_cache_bypass,
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_PROTO(struct regmap *map, bool flag),
|
2012-02-24 05:02:57 +07:00
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_ARGS(map, flag)
|
2012-02-24 05:02:57 +07:00
|
|
|
|
|
|
|
);
|
|
|
|
|
2013-02-22 02:05:48 +07:00
|
|
|
DECLARE_EVENT_CLASS(regmap_async,
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_PROTO(struct regmap *map),
|
2013-02-22 02:05:48 +07:00
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_ARGS(map),
|
2013-02-22 02:05:48 +07:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2015-03-09 18:20:13 +07:00
|
|
|
__string( name, regmap_name(map) )
|
2013-02-22 02:05:48 +07:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2015-03-09 18:20:13 +07:00
|
|
|
__assign_str(name, regmap_name(map));
|
2013-02-22 02:05:48 +07:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("%s", __get_str(name))
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(regmap_block, regmap_async_write_start,
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_PROTO(struct regmap *map, unsigned int reg, int count),
|
2013-02-22 02:05:48 +07:00
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_ARGS(map, reg, count)
|
2013-02-22 02:05:48 +07:00
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(regmap_async, regmap_async_io_complete,
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_PROTO(struct regmap *map),
|
2013-02-22 02:05:48 +07:00
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_ARGS(map)
|
2013-02-22 02:05:48 +07:00
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(regmap_async, regmap_async_complete_start,
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_PROTO(struct regmap *map),
|
2013-02-22 02:05:48 +07:00
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_ARGS(map)
|
2013-02-22 02:05:48 +07:00
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
DEFINE_EVENT(regmap_async, regmap_async_complete_done,
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_PROTO(struct regmap *map),
|
2013-02-22 02:05:48 +07:00
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_ARGS(map)
|
2013-02-22 02:05:48 +07:00
|
|
|
|
|
|
|
);
|
|
|
|
|
2013-05-08 19:55:22 +07:00
|
|
|
TRACE_EVENT(regcache_drop_region,
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_PROTO(struct regmap *map, unsigned int from,
|
2013-05-08 19:55:22 +07:00
|
|
|
unsigned int to),
|
|
|
|
|
2015-03-09 18:20:13 +07:00
|
|
|
TP_ARGS(map, from, to),
|
2013-05-08 19:55:22 +07:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2015-03-09 18:20:13 +07:00
|
|
|
__string( name, regmap_name(map) )
|
|
|
|
__field( unsigned int, from )
|
|
|
|
__field( unsigned int, to )
|
2013-05-08 19:55:22 +07:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2015-03-09 18:20:13 +07:00
|
|
|
__assign_str(name, regmap_name(map));
|
2013-05-08 19:55:22 +07:00
|
|
|
__entry->from = from;
|
|
|
|
__entry->to = to;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("%s %u-%u", __get_str(name), (unsigned int)__entry->from,
|
|
|
|
(unsigned int)__entry->to)
|
|
|
|
);
|
|
|
|
|
2011-07-25 03:30:55 +07:00
|
|
|
#endif /* _TRACE_REGMAP_H */
|
|
|
|
|
2015-03-20 04:50:47 +07:00
|
|
|
#undef TRACE_INCLUDE_PATH
|
|
|
|
#define TRACE_INCLUDE_PATH .
|
|
|
|
|
|
|
|
#undef TRACE_INCLUDE_FILE
|
|
|
|
#define TRACE_INCLUDE_FILE trace
|
|
|
|
|
2011-07-25 03:30:55 +07:00
|
|
|
/* This part must be outside protection */
|
|
|
|
#include <trace/define_trace.h>
|