#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);