diff options
Diffstat (limited to 'drivers/misc/ad525x_dpot.c')
| -rw-r--r-- | drivers/misc/ad525x_dpot.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/misc/ad525x_dpot.c b/drivers/misc/ad525x_dpot.c index a43053daad0e..15e88078ba1e 100644 --- a/drivers/misc/ad525x_dpot.c +++ b/drivers/misc/ad525x_dpot.c | |||
| @@ -176,6 +176,7 @@ static s32 dpot_read_i2c(struct dpot_data *dpot, u8 reg) | |||
| 176 | { | 176 | { |
| 177 | int value; | 177 | int value; |
| 178 | unsigned ctrl = 0; | 178 | unsigned ctrl = 0; |
| 179 | |||
| 179 | switch (dpot->uid) { | 180 | switch (dpot->uid) { |
| 180 | case DPOT_UID(AD5246_ID): | 181 | case DPOT_UID(AD5246_ID): |
| 181 | case DPOT_UID(AD5247_ID): | 182 | case DPOT_UID(AD5247_ID): |
| @@ -333,7 +334,6 @@ static s32 dpot_write_i2c(struct dpot_data *dpot, u8 reg, u16 value) | |||
| 333 | case DPOT_UID(AD5246_ID): | 334 | case DPOT_UID(AD5246_ID): |
| 334 | case DPOT_UID(AD5247_ID): | 335 | case DPOT_UID(AD5247_ID): |
| 335 | return dpot_write_d8(dpot, value); | 336 | return dpot_write_d8(dpot, value); |
| 336 | break; | ||
| 337 | 337 | ||
| 338 | case DPOT_UID(AD5245_ID): | 338 | case DPOT_UID(AD5245_ID): |
| 339 | case DPOT_UID(AD5241_ID): | 339 | case DPOT_UID(AD5241_ID): |
| @@ -345,7 +345,6 @@ static s32 dpot_write_i2c(struct dpot_data *dpot, u8 reg, u16 value) | |||
| 345 | ctrl = ((reg & DPOT_RDAC_MASK) == DPOT_RDAC0) ? | 345 | ctrl = ((reg & DPOT_RDAC_MASK) == DPOT_RDAC0) ? |
| 346 | 0 : DPOT_AD5282_RDAC_AB; | 346 | 0 : DPOT_AD5282_RDAC_AB; |
| 347 | return dpot_write_r8d8(dpot, ctrl, value); | 347 | return dpot_write_r8d8(dpot, ctrl, value); |
| 348 | break; | ||
| 349 | case DPOT_UID(AD5171_ID): | 348 | case DPOT_UID(AD5171_ID): |
| 350 | case DPOT_UID(AD5273_ID): | 349 | case DPOT_UID(AD5273_ID): |
| 351 | if (reg & DPOT_ADDR_OTP) { | 350 | if (reg & DPOT_ADDR_OTP) { |
| @@ -355,7 +354,6 @@ static s32 dpot_write_i2c(struct dpot_data *dpot, u8 reg, u16 value) | |||
| 355 | ctrl = DPOT_AD5273_FUSE; | 354 | ctrl = DPOT_AD5273_FUSE; |
| 356 | } | 355 | } |
| 357 | return dpot_write_r8d8(dpot, ctrl, value); | 356 | return dpot_write_r8d8(dpot, ctrl, value); |
| 358 | break; | ||
| 359 | case DPOT_UID(AD5172_ID): | 357 | case DPOT_UID(AD5172_ID): |
| 360 | case DPOT_UID(AD5173_ID): | 358 | case DPOT_UID(AD5173_ID): |
| 361 | ctrl = ((reg & DPOT_RDAC_MASK) == DPOT_RDAC0) ? | 359 | ctrl = ((reg & DPOT_RDAC_MASK) == DPOT_RDAC0) ? |
| @@ -367,7 +365,6 @@ static s32 dpot_write_i2c(struct dpot_data *dpot, u8 reg, u16 value) | |||
| 367 | ctrl |= DPOT_AD5170_2_3_FUSE; | 365 | ctrl |= DPOT_AD5170_2_3_FUSE; |
| 368 | } | 366 | } |
| 369 | return dpot_write_r8d8(dpot, ctrl, value); | 367 | return dpot_write_r8d8(dpot, ctrl, value); |
| 370 | break; | ||
| 371 | case DPOT_UID(AD5170_ID): | 368 | case DPOT_UID(AD5170_ID): |
| 372 | if (reg & DPOT_ADDR_OTP) { | 369 | if (reg & DPOT_ADDR_OTP) { |
| 373 | tmp = dpot_read_r8d16(dpot, tmp); | 370 | tmp = dpot_read_r8d16(dpot, tmp); |
| @@ -376,7 +373,6 @@ static s32 dpot_write_i2c(struct dpot_data *dpot, u8 reg, u16 value) | |||
| 376 | ctrl = DPOT_AD5170_2_3_FUSE; | 373 | ctrl = DPOT_AD5170_2_3_FUSE; |
| 377 | } | 374 | } |
| 378 | return dpot_write_r8d8(dpot, ctrl, value); | 375 | return dpot_write_r8d8(dpot, ctrl, value); |
| 379 | break; | ||
| 380 | case DPOT_UID(AD5272_ID): | 376 | case DPOT_UID(AD5272_ID): |
| 381 | case DPOT_UID(AD5274_ID): | 377 | case DPOT_UID(AD5274_ID): |
| 382 | dpot_write_r8d8(dpot, DPOT_AD5270_1_2_4_CTRLREG << 2, | 378 | dpot_write_r8d8(dpot, DPOT_AD5270_1_2_4_CTRLREG << 2, |
| @@ -391,7 +387,6 @@ static s32 dpot_write_i2c(struct dpot_data *dpot, u8 reg, u16 value) | |||
| 391 | 387 | ||
| 392 | return dpot_write_r8d8(dpot, (DPOT_AD5270_1_2_4_RDAC << 2) | | 388 | return dpot_write_r8d8(dpot, (DPOT_AD5270_1_2_4_RDAC << 2) | |
| 393 | (value >> 8), value & 0xFF); | 389 | (value >> 8), value & 0xFF); |
| 394 | break; | ||
| 395 | default: | 390 | default: |
| 396 | if (reg & DPOT_ADDR_CMD) | 391 | if (reg & DPOT_ADDR_CMD) |
| 397 | return dpot_write_d8(dpot, reg); | 392 | return dpot_write_d8(dpot, reg); |
