diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-pxa.c')
-rw-r--r-- | drivers/i2c/busses/i2c-pxa.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 14d249f5ed3f..020ff23d762f 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c | |||
@@ -34,9 +34,9 @@ | |||
34 | #include <linux/err.h> | 34 | #include <linux/err.h> |
35 | #include <linux/clk.h> | 35 | #include <linux/clk.h> |
36 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
37 | #include <linux/io.h> | ||
37 | 38 | ||
38 | #include <asm/irq.h> | 39 | #include <asm/irq.h> |
39 | #include <asm/io.h> | ||
40 | #include <plat/i2c.h> | 40 | #include <plat/i2c.h> |
41 | 41 | ||
42 | /* | 42 | /* |
@@ -209,18 +209,6 @@ static void i2c_pxa_show_state(struct pxa_i2c *i2c, int lno, const char *fname) | |||
209 | } | 209 | } |
210 | 210 | ||
211 | #define show_state(i2c) i2c_pxa_show_state(i2c, __LINE__, __func__) | 211 | #define show_state(i2c) i2c_pxa_show_state(i2c, __LINE__, __func__) |
212 | #else | ||
213 | #define i2c_debug 0 | ||
214 | |||
215 | #define show_state(i2c) do { } while (0) | ||
216 | #define decode_ISR(val) do { } while (0) | ||
217 | #define decode_ICR(val) do { } while (0) | ||
218 | #endif | ||
219 | |||
220 | #define eedbg(lvl, x...) do { if ((lvl) < 1) { printk(KERN_DEBUG "" x); } } while(0) | ||
221 | |||
222 | static void i2c_pxa_master_complete(struct pxa_i2c *i2c, int ret); | ||
223 | static irqreturn_t i2c_pxa_handler(int this_irq, void *dev_id); | ||
224 | 212 | ||
225 | static void i2c_pxa_scream_blue_murder(struct pxa_i2c *i2c, const char *why) | 213 | static void i2c_pxa_scream_blue_murder(struct pxa_i2c *i2c, const char *why) |
226 | { | 214 | { |
@@ -236,6 +224,20 @@ static void i2c_pxa_scream_blue_murder(struct pxa_i2c *i2c, const char *why) | |||
236 | printk("\n"); | 224 | printk("\n"); |
237 | } | 225 | } |
238 | 226 | ||
227 | #else /* ifdef DEBUG */ | ||
228 | |||
229 | #define i2c_debug 0 | ||
230 | |||
231 | #define show_state(i2c) do { } while (0) | ||
232 | #define decode_ISR(val) do { } while (0) | ||
233 | #define decode_ICR(val) do { } while (0) | ||
234 | #define i2c_pxa_scream_blue_murder(i2c, why) do { } while (0) | ||
235 | |||
236 | #endif /* ifdef DEBUG / else */ | ||
237 | |||
238 | static void i2c_pxa_master_complete(struct pxa_i2c *i2c, int ret); | ||
239 | static irqreturn_t i2c_pxa_handler(int this_irq, void *dev_id); | ||
240 | |||
239 | static inline int i2c_pxa_is_slavemode(struct pxa_i2c *i2c) | 241 | static inline int i2c_pxa_is_slavemode(struct pxa_i2c *i2c) |
240 | { | 242 | { |
241 | return !(readl(_ICR(i2c)) & ICR_SCLE); | 243 | return !(readl(_ICR(i2c)) & ICR_SCLE); |