Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217525
b: refs/heads/master
c: 5f400cf
h: refs/heads/master
i:
  217523: cdefcb4
v: v3
  • Loading branch information
Michael Hennerich authored and Linus Torvalds committed Oct 26, 2010
1 parent c9417a3 commit 5908a64
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 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: 10ad5278bbc961c9df8260f3e116d60eaaa3fb18
refs/heads/master: 5f400cf40fc703673aa791966ffb1c628c1ff45a
10 changes: 5 additions & 5 deletions trunk/drivers/misc/ad525x_dpot.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ static s32 dpot_read_i2c(struct dpot_data *dpot, u8 reg)
case DPOT_UID(AD5280_ID):
case DPOT_UID(AD5282_ID):
ctrl = ((reg & DPOT_RDAC_MASK) == DPOT_RDAC0) ?
0 : DPOT_AD5291_RDAC_AB;
0 : DPOT_AD5282_RDAC_AB;
return dpot_read_r8d8(dpot, ctrl);
case DPOT_UID(AD5170_ID):
case DPOT_UID(AD5171_ID):
Expand All @@ -175,7 +175,7 @@ static s32 dpot_read_i2c(struct dpot_data *dpot, u8 reg)
case DPOT_UID(AD5172_ID):
case DPOT_UID(AD5173_ID):
ctrl = ((reg & DPOT_RDAC_MASK) == DPOT_RDAC0) ?
0 : DPOT_AD5272_3_A0;
0 : DPOT_AD5172_3_A0;
return dpot_read_r8d8(dpot, ctrl);
default:
if ((reg & DPOT_REG_TOL) || (dpot->max_pos > 256))
Expand Down Expand Up @@ -273,7 +273,7 @@ static s32 dpot_write_i2c(struct dpot_data *dpot, u8 reg, u16 value)
case DPOT_UID(AD5280_ID):
case DPOT_UID(AD5282_ID):
ctrl = ((reg & DPOT_RDAC_MASK) == DPOT_RDAC0) ?
0 : DPOT_AD5291_RDAC_AB;
0 : DPOT_AD5282_RDAC_AB;
return dpot_write_r8d8(dpot, ctrl, value);
break;
case DPOT_UID(AD5171_ID):
Expand All @@ -289,12 +289,12 @@ static s32 dpot_write_i2c(struct dpot_data *dpot, u8 reg, u16 value)
case DPOT_UID(AD5172_ID):
case DPOT_UID(AD5173_ID):
ctrl = ((reg & DPOT_RDAC_MASK) == DPOT_RDAC0) ?
0 : DPOT_AD5272_3_A0;
0 : DPOT_AD5172_3_A0;
if (reg & DPOT_ADDR_OTP) {
tmp = dpot_read_r8d16(dpot, ctrl);
if (tmp >> 14) /* Ready to Program? */
return -EFAULT;
ctrl |= DPOT_AD5270_2_3_FUSE;
ctrl |= DPOT_AD5170_2_3_FUSE;
}
return dpot_write_r8d8(dpot, ctrl, value);
break;
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/misc/ad525x_dpot.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,14 @@ enum dpot_devid {
#define DPOT_AD5291_RDAC 0x01
#define DPOT_AD5291_READ_RDAC 0x02

/* AD524x use special commands */
#define DPOT_AD5291_RDAC_AB 0x80

#define DPOT_AD5282_RDAC_AB 0x80
#define DPOT_AD5273_FUSE 0x80
#define DPOT_AD5270_2_3_FUSE 0x20
#define DPOT_AD5270_2_3_OW 0x08
#define DPOT_AD5272_3_A0 0x08
#define DPOT_AD5270_2FUSE 0x80
#define DPOT_AD5170_2_3_FUSE 0x20
#define DPOT_AD5170_2_3_OW 0x08
#define DPOT_AD5172_3_A0 0x08
#define DPOT_AD5170_2FUSE 0x80

struct dpot_data;

Expand Down

0 comments on commit 5908a64

Please sign in to comment.