diff options
| -rw-r--r-- | drivers/i2c/algos/i2c-algo-pca.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/i2c/algos/i2c-algo-pca.c b/drivers/i2c/algos/i2c-algo-pca.c index d50b329a3c9..943d70ee5d5 100644 --- a/drivers/i2c/algos/i2c-algo-pca.c +++ b/drivers/i2c/algos/i2c-algo-pca.c | |||
| @@ -27,9 +27,12 @@ | |||
| 27 | #include <linux/i2c.h> | 27 | #include <linux/i2c.h> |
| 28 | #include <linux/i2c-algo-pca.h> | 28 | #include <linux/i2c-algo-pca.h> |
| 29 | 29 | ||
| 30 | #define DEB1(fmt, args...) do { if (i2c_debug>=1) printk(fmt, ## args); } while(0) | 30 | #define DEB1(fmt, args...) do { if (i2c_debug >= 1) \ |
| 31 | #define DEB2(fmt, args...) do { if (i2c_debug>=2) printk(fmt, ## args); } while(0) | 31 | printk(KERN_DEBUG fmt, ## args); } while (0) |
| 32 | #define DEB3(fmt, args...) do { if (i2c_debug>=3) printk(fmt, ## args); } while(0) | 32 | #define DEB2(fmt, args...) do { if (i2c_debug >= 2) \ |
| 33 | printk(KERN_DEBUG fmt, ## args); } while (0) | ||
| 34 | #define DEB3(fmt, args...) do { if (i2c_debug >= 3) \ | ||
| 35 | printk(KERN_DEBUG fmt, ## args); } while (0) | ||
| 33 | 36 | ||
| 34 | static int i2c_debug; | 37 | static int i2c_debug; |
| 35 | 38 | ||
| @@ -313,7 +316,7 @@ static int pca_xfer(struct i2c_adapter *i2c_adap, | |||
| 313 | 316 | ||
| 314 | ret = curmsg; | 317 | ret = curmsg; |
| 315 | out: | 318 | out: |
| 316 | DEB1(KERN_CRIT "}}} transfered %d/%d messages. " | 319 | DEB1("}}} transfered %d/%d messages. " |
| 317 | "status is %#04x. control is %#04x\n", | 320 | "status is %#04x. control is %#04x\n", |
| 318 | curmsg, num, pca_status(adap), | 321 | curmsg, num, pca_status(adap), |
| 319 | pca_get_con(adap)); | 322 | pca_get_con(adap)); |
| @@ -347,7 +350,8 @@ static int pca_init(struct i2c_adapter *adap) | |||
| 347 | pca_reset(pca_data); | 350 | pca_reset(pca_data); |
| 348 | 351 | ||
| 349 | clock = pca_clock(pca_data); | 352 | clock = pca_clock(pca_data); |
| 350 | DEB1(KERN_INFO "%s: Clock frequency is %dkHz\n", adap->name, freqs[clock]); | 353 | printk(KERN_INFO "%s: Clock frequency is %dkHz\n", adap->name, |
| 354 | freqs[clock]); | ||
| 351 | 355 | ||
| 352 | pca_set_con(pca_data, I2C_PCA_CON_ENSIO | clock); | 356 | pca_set_con(pca_data, I2C_PCA_CON_ENSIO | clock); |
| 353 | udelay(500); /* 500 us for oscilator to stabilise */ | 357 | udelay(500); /* 500 us for oscilator to stabilise */ |
