250f6715a4
"[RFC PATCH 0/2] audit of linux/device.h users in include/*" https://lkml.org/lkml/2012/3/4/159 -- Nearly every subsystem has some kind of header with a proto like: void foo(struct device *dev); and yet there is no reason for most of these guys to care about the sub fields within the device struct. This allows us to significantly reduce the scope of headers including headers. For this instance, a reduction of about 40% is achieved by replacing the include with the simple fact that the device is some kind of a struct. Unlike the much larger module.h cleanup, this one is simply two commits. One to fix the implicit <linux/device.h> users, and then one to delete the device.h includes from the linux/include/ dir wherever possible. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJPbNxLAAoJEOvOhAQsB9HWR6QQAMRUZ94O2069/nW9h4TO/xTr Hq/80lo/TBBiRmob3iWBP76lzgeeMPPVEX1I6N7YYlhL3IL7HsaJH1DvpIPPHXQP GFKcBsZ5ZLV8c4CBDSr+/HFNdhXc0bw0awBjBvR7gAsWuZpNFn4WbhizJi4vWAoE 4ydhPu55G1G8TkBtYLJQ8xavxsmiNBSDhd2i+0vn6EVpgmXynjOMG8qXyaS97Jvg pZLwnN5Wu21coj6+xH3QUKCl1mJ+KGyamWX5gFBVIfsDB3k5H4neijVm7t1en4b0 cWxmXeR/JE3VLEl/17yN2dodD8qw1QzmTWzz1vmwJl2zK+rRRAByBrL0DP7QCwCZ ppeJbdhkMBwqjtknwrmMwsuAzUdJd79GXA+6Vm+xSEkr6FEPK1M0kGbvaqV9Usgd ohMewewbO6ddgR9eF7Kw2FAwo0hwkPNEplXIym9rZzFG1h+T0STGSHvkn7LV765E ul1FapSV3GCxEVRwWTwD28FLU2+0zlkOZ5sxXwNPTT96cNmW+R7TGuslZKNaMNjX q7eBZxo8DtVt/jqJTntR8bs8052c8g1Ac1IKmlW8VSmFwT1M6VBGRn1/JWAhuUgv dBK/FF+I1GJTAJWIhaFcKXLHvmV9uhS6JaIhLMDOetoOkpqSptJ42hDG+89WkFRk o55GQ5TFdoOpqxVzGbvE =3j4+ -----END PGP SIGNATURE----- Merge tag 'device-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux Pull <linux/device.h> avoidance patches from Paul Gortmaker: "Nearly every subsystem has some kind of header with a proto like: void foo(struct device *dev); and yet there is no reason for most of these guys to care about the sub fields within the device struct. This allows us to significantly reduce the scope of headers including headers. For this instance, a reduction of about 40% is achieved by replacing the include with the simple fact that the device is some kind of a struct. Unlike the much larger module.h cleanup, this one is simply two commits. One to fix the implicit <linux/device.h> users, and then one to delete the device.h includes from the linux/include/ dir wherever possible." * tag 'device-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: device.h: audit and cleanup users in main include dir device.h: cleanup users outside of linux/include (C files)
182 lines
3.3 KiB
C
182 lines
3.3 KiB
C
#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>
|
|
|
|
struct device;
|
|
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)
|
|
|
|
);
|
|
|
|
DEFINE_EVENT(regmap_reg, regmap_reg_read_cache,
|
|
|
|
TP_PROTO(struct device *dev, unsigned int reg,
|
|
unsigned int val),
|
|
|
|
TP_ARGS(dev, reg, val)
|
|
|
|
);
|
|
|
|
DECLARE_EVENT_CLASS(regmap_block,
|
|
|
|
TP_PROTO(struct device *dev, unsigned int reg, int count),
|
|
|
|
TP_ARGS(dev, reg, count),
|
|
|
|
TP_STRUCT__entry(
|
|
__string( name, dev_name(dev) )
|
|
__field( unsigned int, reg )
|
|
__field( int, count )
|
|
),
|
|
|
|
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,
|
|
(int)__entry->count)
|
|
);
|
|
|
|
DEFINE_EVENT(regmap_block, regmap_hw_read_start,
|
|
|
|
TP_PROTO(struct device *dev, unsigned int reg, int count),
|
|
|
|
TP_ARGS(dev, reg, count)
|
|
);
|
|
|
|
DEFINE_EVENT(regmap_block, regmap_hw_read_done,
|
|
|
|
TP_PROTO(struct device *dev, unsigned int reg, int count),
|
|
|
|
TP_ARGS(dev, reg, count)
|
|
);
|
|
|
|
DEFINE_EVENT(regmap_block, regmap_hw_write_start,
|
|
|
|
TP_PROTO(struct device *dev, unsigned int reg, int count),
|
|
|
|
TP_ARGS(dev, reg, count)
|
|
);
|
|
|
|
DEFINE_EVENT(regmap_block, regmap_hw_write_done,
|
|
|
|
TP_PROTO(struct device *dev, unsigned int reg, int count),
|
|
|
|
TP_ARGS(dev, reg, count)
|
|
);
|
|
|
|
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))
|
|
);
|
|
|
|
DECLARE_EVENT_CLASS(regmap_bool,
|
|
|
|
TP_PROTO(struct device *dev, bool flag),
|
|
|
|
TP_ARGS(dev, flag),
|
|
|
|
TP_STRUCT__entry(
|
|
__string( name, dev_name(dev) )
|
|
__field( int, flag )
|
|
),
|
|
|
|
TP_fast_assign(
|
|
__assign_str(name, dev_name(dev));
|
|
__entry->flag = flag;
|
|
),
|
|
|
|
TP_printk("%s flag=%d", __get_str(name),
|
|
(int)__entry->flag)
|
|
);
|
|
|
|
DEFINE_EVENT(regmap_bool, regmap_cache_only,
|
|
|
|
TP_PROTO(struct device *dev, bool flag),
|
|
|
|
TP_ARGS(dev, flag)
|
|
|
|
);
|
|
|
|
DEFINE_EVENT(regmap_bool, regmap_cache_bypass,
|
|
|
|
TP_PROTO(struct device *dev, bool flag),
|
|
|
|
TP_ARGS(dev, flag)
|
|
|
|
);
|
|
|
|
#endif /* _TRACE_REGMAP_H */
|
|
|
|
/* This part must be outside protection */
|
|
#include <trace/define_trace.h>
|