Commit 0c53b9fb authored by Michael Hennerich's avatar Michael Hennerich Committed by Linus Torvalds

ad525x_dpot: extend write argument to 16bits

The possible output data is 16bits, not 8bits, so don't truncate it.
Signed-off-by: default avatarMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0993dbed
...@@ -75,7 +75,7 @@ enum dpot_devid { ...@@ -75,7 +75,7 @@ enum dpot_devid {
#define AD525X_INC_ALL (AD525X_I2C_CMD | (0xB << 3)) #define AD525X_INC_ALL (AD525X_I2C_CMD | (0xB << 3))
static s32 ad525x_read(struct i2c_client *client, u8 reg); static s32 ad525x_read(struct i2c_client *client, u8 reg);
static s32 ad525x_write(struct i2c_client *client, u8 reg, u8 value); static s32 ad525x_write(struct i2c_client *client, u8 reg, u16 value);
/* /*
* Client data (each client gets its own) * Client data (each client gets its own)
...@@ -296,7 +296,7 @@ static s32 ad525x_read(struct i2c_client *client, u8 reg) ...@@ -296,7 +296,7 @@ static s32 ad525x_read(struct i2c_client *client, u8 reg)
* A negative return value indicates an error occurred while reading * A negative return value indicates an error occurred while reading
* the register. * the register.
*/ */
static s32 ad525x_write(struct i2c_client *client, u8 reg, u8 value) static s32 ad525x_write(struct i2c_client *client, u8 reg, u16 value)
{ {
struct dpot_data *data = i2c_get_clientdata(client); struct dpot_data *data = i2c_get_clientdata(client);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment