Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137570
b: refs/heads/master
c: bac3e7c
h: refs/heads/master
v: v3
  • Loading branch information
Frank Seidel authored and Jean Delvare committed Mar 28, 2009
1 parent 5a13c2b commit 16b22db
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 98a679cad56c0ba4677821836179abbe0aff8769
refs/heads/master: bac3e7c2aa2575a1c71f6fa643499676ca7c12c3
14 changes: 9 additions & 5 deletions trunk/drivers/i2c/algos/i2c-algo-pca.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@
#include <linux/i2c.h>
#include <linux/i2c-algo-pca.h>

#define DEB1(fmt, args...) do { if (i2c_debug>=1) printk(fmt, ## args); } while(0)
#define DEB2(fmt, args...) do { if (i2c_debug>=2) printk(fmt, ## args); } while(0)
#define DEB3(fmt, args...) do { if (i2c_debug>=3) printk(fmt, ## args); } while(0)
#define DEB1(fmt, args...) do { if (i2c_debug >= 1) \
printk(KERN_DEBUG fmt, ## args); } while (0)
#define DEB2(fmt, args...) do { if (i2c_debug >= 2) \
printk(KERN_DEBUG fmt, ## args); } while (0)
#define DEB3(fmt, args...) do { if (i2c_debug >= 3) \
printk(KERN_DEBUG fmt, ## args); } while (0)

static int i2c_debug;

Expand Down Expand Up @@ -313,7 +316,7 @@ static int pca_xfer(struct i2c_adapter *i2c_adap,

ret = curmsg;
out:
DEB1(KERN_CRIT "}}} transfered %d/%d messages. "
DEB1("}}} transfered %d/%d messages. "
"status is %#04x. control is %#04x\n",
curmsg, num, pca_status(adap),
pca_get_con(adap));
Expand Down Expand Up @@ -347,7 +350,8 @@ static int pca_init(struct i2c_adapter *adap)
pca_reset(pca_data);

clock = pca_clock(pca_data);
DEB1(KERN_INFO "%s: Clock frequency is %dkHz\n", adap->name, freqs[clock]);
printk(KERN_INFO "%s: Clock frequency is %dkHz\n", adap->name,
freqs[clock]);

pca_set_con(pca_data, I2C_PCA_CON_ENSIO | clock);
udelay(500); /* 500 us for oscilator to stabilise */
Expand Down

0 comments on commit 16b22db

Please sign in to comment.