您的位置:首页 > 其它

调试篇一之动态调节

2016-01-27 11:22 211 查看
#define BIT(nr) (1UL << (nr))

enum print_reason {

PR_REGISTER = BIT(0),

PR_INTERRUPT = BIT(1),

PR_STATUS = BIT(2),

PR_DUMP = BIT(3),

PR_PM = BIT(4),

PR_MISC = BIT(5),

PR_WIPOWER = BIT(6),

};

staticint smbchg_debug_mask= 46;

module_param_named(

debug_mask, smbchg_debug_mask,int, S_IRUSR | S_IWUSR);

#define pr_smb(reason, fmt,...) \

do { \

if (smbchg_debug_mask& (reason)) \

pr_info(fmt, ##__VA_ARGS__); \

else \

pr_debug(fmt, ##__VA_ARGS__); \

} while (0)

pr_smb(PR_REGISTER, "addr =0x%x writing 0x%x\n", base, reg);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: