diff options
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/ad525x_dpot.c | 10 | ||||
-rw-r--r-- | drivers/misc/ad525x_dpot.h | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/drivers/misc/ad525x_dpot.c b/drivers/misc/ad525x_dpot.c index 5e6fa8449e8b..9698c7546911 100644 --- a/drivers/misc/ad525x_dpot.c +++ b/drivers/misc/ad525x_dpot.c | |||
@@ -166,7 +166,7 @@ static s32 dpot_read_i2c(struct dpot_data *dpot, u8 reg) | |||
166 | case DPOT_UID(AD5280_ID): | 166 | case DPOT_UID(AD5280_ID): |
167 | case DPOT_UID(AD5282_ID): | 167 | case DPOT_UID(AD5282_ID): |
168 | ctrl = ((reg & DPOT_RDAC_MASK) == DPOT_RDAC0) ? | 168 | ctrl = ((reg & DPOT_RDAC_MASK) == DPOT_RDAC0) ? |
169 | 0 : DPOT_AD5291_RDAC_AB; | 169 | 0 : DPOT_AD5282_RDAC_AB; |
170 | return dpot_read_r8d8(dpot, ctrl); | 170 | return dpot_read_r8d8(dpot, ctrl); |
171 | case DPOT_UID(AD5170_ID): | 171 | case DPOT_UID(AD5170_ID): |
172 | case DPOT_UID(AD5171_ID): | 172 | case DPOT_UID(AD5171_ID): |
@@ -175,7 +175,7 @@ static s32 dpot_read_i2c(struct dpot_data *dpot, u8 reg) | |||
175 | case DPOT_UID(AD5172_ID): | 175 | case DPOT_UID(AD5172_ID): |
176 | case DPOT_UID(AD5173_ID): | 176 | case DPOT_UID(AD5173_ID): |
177 | ctrl = ((reg & DPOT_RDAC_MASK) == DPOT_RDAC0) ? | 177 | ctrl = ((reg & DPOT_RDAC_MASK) == DPOT_RDAC0) ? |
178 | 0 : DPOT_AD5272_3_A0; | 178 | 0 : DPOT_AD5172_3_A0; |
179 | return dpot_read_r8d8(dpot, ctrl); | 179 | return dpot_read_r8d8(dpot, ctrl); |
180 | default: | 180 | default: |
181 | if ((reg & DPOT_REG_TOL) || (dpot->max_pos > 256)) | 181 | if ((reg & DPOT_REG_TOL) || (dpot->max_pos > 256)) |
@@ -273,7 +273,7 @@ static s32 dpot_write_i2c(struct dpot_data *dpot, u8 reg, u16 value) | |||
273 | case DPOT_UID(AD5280_ID): | 273 | case DPOT_UID(AD5280_ID): |
274 | case DPOT_UID(AD5282_ID): | 274 | case DPOT_UID(AD5282_ID): |
275 | ctrl = ((reg & DPOT_RDAC_MASK) == DPOT_RDAC0) ? | 275 | ctrl = ((reg & DPOT_RDAC_MASK) == DPOT_RDAC0) ? |
276 | 0 : DPOT_AD5291_RDAC_AB; | 276 | 0 : DPOT_AD5282_RDAC_AB; |
277 | return dpot_write_r8d8(dpot, ctrl, value); | 277 | return dpot_write_r8d8(dpot, ctrl, value); |
278 | break; | 278 | break; |
279 | case DPOT_UID(AD5171_ID): | 279 | case DPOT_UID(AD5171_ID): |
@@ -289,12 +289,12 @@ static s32 dpot_write_i2c(struct dpot_data *dpot, u8 reg, u16 value) | |||
289 | case DPOT_UID(AD5172_ID): | 289 | case DPOT_UID(AD5172_ID): |
290 | case DPOT_UID(AD5173_ID): | 290 | case DPOT_UID(AD5173_ID): |
291 | ctrl = ((reg & DPOT_RDAC_MASK) == DPOT_RDAC0) ? | 291 | ctrl = ((reg & DPOT_RDAC_MASK) == DPOT_RDAC0) ? |
292 | 0 : DPOT_AD5272_3_A0; | 292 | 0 : DPOT_AD5172_3_A0; |
293 | if (reg & DPOT_ADDR_OTP) { | 293 | if (reg & DPOT_ADDR_OTP) { |
294 | tmp = dpot_read_r8d16(dpot, ctrl); | 294 | tmp = dpot_read_r8d16(dpot, ctrl); |
295 | if (tmp >> 14) /* Ready to Program? */ | 295 | if (tmp >> 14) /* Ready to Program? */ |
296 | return -EFAULT; | 296 | return -EFAULT; |
297 | ctrl |= DPOT_AD5270_2_3_FUSE; | 297 | ctrl |= DPOT_AD5170_2_3_FUSE; |
298 | } | 298 | } |
299 | return dpot_write_r8d8(dpot, ctrl, value); | 299 | return dpot_write_r8d8(dpot, ctrl, value); |
300 | break; | 300 | break; |
diff --git a/drivers/misc/ad525x_dpot.h b/drivers/misc/ad525x_dpot.h index 78b89fd2e2fd..7609d49efd31 100644 --- a/drivers/misc/ad525x_dpot.h +++ b/drivers/misc/ad525x_dpot.h | |||
@@ -166,14 +166,14 @@ enum dpot_devid { | |||
166 | #define DPOT_AD5291_RDAC 0x01 | 166 | #define DPOT_AD5291_RDAC 0x01 |
167 | #define DPOT_AD5291_READ_RDAC 0x02 | 167 | #define DPOT_AD5291_READ_RDAC 0x02 |
168 | 168 | ||
169 | /* AD524x use special commands */ | ||
170 | #define DPOT_AD5291_RDAC_AB 0x80 | 169 | #define DPOT_AD5291_RDAC_AB 0x80 |
171 | 170 | ||
171 | #define DPOT_AD5282_RDAC_AB 0x80 | ||
172 | #define DPOT_AD5273_FUSE 0x80 | 172 | #define DPOT_AD5273_FUSE 0x80 |
173 | #define DPOT_AD5270_2_3_FUSE 0x20 | 173 | #define DPOT_AD5170_2_3_FUSE 0x20 |
174 | #define DPOT_AD5270_2_3_OW 0x08 | 174 | #define DPOT_AD5170_2_3_OW 0x08 |
175 | #define DPOT_AD5272_3_A0 0x08 | 175 | #define DPOT_AD5172_3_A0 0x08 |
176 | #define DPOT_AD5270_2FUSE 0x80 | 176 | #define DPOT_AD5170_2FUSE 0x80 |
177 | 177 | ||
178 | struct dpot_data; | 178 | struct dpot_data; |
179 | 179 | ||