提交 5f400cf4 编写于 作者: M Michael Hennerich 提交者: Linus Torvalds

drivers/misc/ad525x_dpot.c: fix part name typos in defines

There is no runtime effect by this change.  It frees up namespace for
defines erroneously used.  This is required to actually support devices
requiring the namespace, added with "drivers/misc/ad525x_dpot.c: new
features".

All defines touched have the same value defined, after the change.
Signed-off-by: NMichael Hennerich <michael.hennerich@analog.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Chris Verges <chrisv@cyberswitching.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 10ad5278
...@@ -166,7 +166,7 @@ static s32 dpot_read_i2c(struct dpot_data *dpot, u8 reg) ...@@ -166,7 +166,7 @@ static s32 dpot_read_i2c(struct dpot_data *dpot, u8 reg)
case DPOT_UID(AD5280_ID): case DPOT_UID(AD5280_ID):
case DPOT_UID(AD5282_ID): case DPOT_UID(AD5282_ID):
ctrl = ((reg & DPOT_RDAC_MASK) == DPOT_RDAC0) ? ctrl = ((reg & DPOT_RDAC_MASK) == DPOT_RDAC0) ?
0 : DPOT_AD5291_RDAC_AB; 0 : DPOT_AD5282_RDAC_AB;
return dpot_read_r8d8(dpot, ctrl); return dpot_read_r8d8(dpot, ctrl);
case DPOT_UID(AD5170_ID): case DPOT_UID(AD5170_ID):
case DPOT_UID(AD5171_ID): case DPOT_UID(AD5171_ID):
...@@ -175,7 +175,7 @@ static s32 dpot_read_i2c(struct dpot_data *dpot, u8 reg) ...@@ -175,7 +175,7 @@ static s32 dpot_read_i2c(struct dpot_data *dpot, u8 reg)
case DPOT_UID(AD5172_ID): case DPOT_UID(AD5172_ID):
case DPOT_UID(AD5173_ID): case DPOT_UID(AD5173_ID):
ctrl = ((reg & DPOT_RDAC_MASK) == DPOT_RDAC0) ? ctrl = ((reg & DPOT_RDAC_MASK) == DPOT_RDAC0) ?
0 : DPOT_AD5272_3_A0; 0 : DPOT_AD5172_3_A0;
return dpot_read_r8d8(dpot, ctrl); return dpot_read_r8d8(dpot, ctrl);
default: default:
if ((reg & DPOT_REG_TOL) || (dpot->max_pos > 256)) 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,7 +273,7 @@ static s32 dpot_write_i2c(struct dpot_data *dpot, u8 reg, u16 value)
case DPOT_UID(AD5280_ID): case DPOT_UID(AD5280_ID):
case DPOT_UID(AD5282_ID): case DPOT_UID(AD5282_ID):
ctrl = ((reg & DPOT_RDAC_MASK) == DPOT_RDAC0) ? ctrl = ((reg & DPOT_RDAC_MASK) == DPOT_RDAC0) ?
0 : DPOT_AD5291_RDAC_AB; 0 : DPOT_AD5282_RDAC_AB;
return dpot_write_r8d8(dpot, ctrl, value); return dpot_write_r8d8(dpot, ctrl, value);
break; break;
case DPOT_UID(AD5171_ID): case DPOT_UID(AD5171_ID):
...@@ -289,12 +289,12 @@ static s32 dpot_write_i2c(struct dpot_data *dpot, u8 reg, u16 value) ...@@ -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(AD5172_ID):
case DPOT_UID(AD5173_ID): case DPOT_UID(AD5173_ID):
ctrl = ((reg & DPOT_RDAC_MASK) == DPOT_RDAC0) ? ctrl = ((reg & DPOT_RDAC_MASK) == DPOT_RDAC0) ?
0 : DPOT_AD5272_3_A0; 0 : DPOT_AD5172_3_A0;
if (reg & DPOT_ADDR_OTP) { if (reg & DPOT_ADDR_OTP) {
tmp = dpot_read_r8d16(dpot, ctrl); tmp = dpot_read_r8d16(dpot, ctrl);
if (tmp >> 14) /* Ready to Program? */ if (tmp >> 14) /* Ready to Program? */
return -EFAULT; return -EFAULT;
ctrl |= DPOT_AD5270_2_3_FUSE; ctrl |= DPOT_AD5170_2_3_FUSE;
} }
return dpot_write_r8d8(dpot, ctrl, value); return dpot_write_r8d8(dpot, ctrl, value);
break; break;
......
...@@ -166,14 +166,14 @@ enum dpot_devid { ...@@ -166,14 +166,14 @@ enum dpot_devid {
#define DPOT_AD5291_RDAC 0x01 #define DPOT_AD5291_RDAC 0x01
#define DPOT_AD5291_READ_RDAC 0x02 #define DPOT_AD5291_READ_RDAC 0x02
/* AD524x use special commands */
#define DPOT_AD5291_RDAC_AB 0x80 #define DPOT_AD5291_RDAC_AB 0x80
#define DPOT_AD5282_RDAC_AB 0x80
#define DPOT_AD5273_FUSE 0x80 #define DPOT_AD5273_FUSE 0x80
#define DPOT_AD5270_2_3_FUSE 0x20 #define DPOT_AD5170_2_3_FUSE 0x20
#define DPOT_AD5270_2_3_OW 0x08 #define DPOT_AD5170_2_3_OW 0x08
#define DPOT_AD5272_3_A0 0x08 #define DPOT_AD5172_3_A0 0x08
#define DPOT_AD5270_2FUSE 0x80 #define DPOT_AD5170_2FUSE 0x80
struct dpot_data; struct dpot_data;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册