diff options
Diffstat (limited to 'drivers/media/rc/fintek-cir.c')
-rw-r--r-- | drivers/media/rc/fintek-cir.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c index 6aabf7ae3a31..ab30c64f8124 100644 --- a/drivers/media/rc/fintek-cir.c +++ b/drivers/media/rc/fintek-cir.c | |||
@@ -23,6 +23,8 @@ | |||
23 | * USA | 23 | * USA |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
27 | |||
26 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
27 | #include <linux/module.h> | 29 | #include <linux/module.h> |
28 | #include <linux/pnp.h> | 30 | #include <linux/pnp.h> |
@@ -110,30 +112,32 @@ static u8 fintek_cir_reg_read(struct fintek_dev *fintek, u8 offset) | |||
110 | return val; | 112 | return val; |
111 | } | 113 | } |
112 | 114 | ||
113 | #define pr_reg(text, ...) \ | ||
114 | printk(KERN_INFO KBUILD_MODNAME ": " text, ## __VA_ARGS__) | ||
115 | |||
116 | /* dump current cir register contents */ | 115 | /* dump current cir register contents */ |
117 | static void cir_dump_regs(struct fintek_dev *fintek) | 116 | static void cir_dump_regs(struct fintek_dev *fintek) |
118 | { | 117 | { |
119 | fintek_config_mode_enable(fintek); | 118 | fintek_config_mode_enable(fintek); |
120 | fintek_select_logical_dev(fintek, fintek->logical_dev_cir); | 119 | fintek_select_logical_dev(fintek, fintek->logical_dev_cir); |
121 | 120 | ||
122 | pr_reg("%s: Dump CIR logical device registers:\n", FINTEK_DRIVER_NAME); | 121 | pr_info("%s: Dump CIR logical device registers:\n", FINTEK_DRIVER_NAME); |
123 | pr_reg(" * CR CIR BASE ADDR: 0x%x\n", | 122 | pr_info(" * CR CIR BASE ADDR: 0x%x\n", |
124 | (fintek_cr_read(fintek, CIR_CR_BASE_ADDR_HI) << 8) | | 123 | (fintek_cr_read(fintek, CIR_CR_BASE_ADDR_HI) << 8) | |
125 | fintek_cr_read(fintek, CIR_CR_BASE_ADDR_LO)); | 124 | fintek_cr_read(fintek, CIR_CR_BASE_ADDR_LO)); |
126 | pr_reg(" * CR CIR IRQ NUM: 0x%x\n", | 125 | pr_info(" * CR CIR IRQ NUM: 0x%x\n", |
127 | fintek_cr_read(fintek, CIR_CR_IRQ_SEL)); | 126 | fintek_cr_read(fintek, CIR_CR_IRQ_SEL)); |
128 | 127 | ||
129 | fintek_config_mode_disable(fintek); | 128 | fintek_config_mode_disable(fintek); |
130 | 129 | ||
131 | pr_reg("%s: Dump CIR registers:\n", FINTEK_DRIVER_NAME); | 130 | pr_info("%s: Dump CIR registers:\n", FINTEK_DRIVER_NAME); |
132 | pr_reg(" * STATUS: 0x%x\n", fintek_cir_reg_read(fintek, CIR_STATUS)); | 131 | pr_info(" * STATUS: 0x%x\n", |
133 | pr_reg(" * CONTROL: 0x%x\n", fintek_cir_reg_read(fintek, CIR_CONTROL)); | 132 | fintek_cir_reg_read(fintek, CIR_STATUS)); |
134 | pr_reg(" * RX_DATA: 0x%x\n", fintek_cir_reg_read(fintek, CIR_RX_DATA)); | 133 | pr_info(" * CONTROL: 0x%x\n", |
135 | pr_reg(" * TX_CONTROL: 0x%x\n", fintek_cir_reg_read(fintek, CIR_TX_CONTROL)); | 134 | fintek_cir_reg_read(fintek, CIR_CONTROL)); |
136 | pr_reg(" * TX_DATA: 0x%x\n", fintek_cir_reg_read(fintek, CIR_TX_DATA)); | 135 | pr_info(" * RX_DATA: 0x%x\n", |
136 | fintek_cir_reg_read(fintek, CIR_RX_DATA)); | ||
137 | pr_info(" * TX_CONTROL: 0x%x\n", | ||
138 | fintek_cir_reg_read(fintek, CIR_TX_CONTROL)); | ||
139 | pr_info(" * TX_DATA: 0x%x\n", | ||
140 | fintek_cir_reg_read(fintek, CIR_TX_DATA)); | ||
137 | } | 141 | } |
138 | 142 | ||
139 | /* detect hardware features */ | 143 | /* detect hardware features */ |