aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/adc/ad799x.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-01-27 19:59:56 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-27 19:59:56 -0500
commit95f873f2fff96c592c5d863e2a39825bd8bf0500 (patch)
tree0d2dd664964ba2c701aefea5b4d1e85b481045e1 /drivers/iio/adc/ad799x.c
parent8ea65f4a2dfaaf494ef42a16cbf2fea39b07450f (diff)
parent59343cd7c4809cf7598789e1cd14563780ae4239 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: arch/arm/boot/dts/imx6sx-sdb.dts net/sched/cls_bpf.c Two simple sets of overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/iio/adc/ad799x.c')
-rw-r--r--drivers/iio/adc/ad799x.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/iio/adc/ad799x.c b/drivers/iio/adc/ad799x.c
index e37412da15f5..b99de00e57b8 100644
--- a/drivers/iio/adc/ad799x.c
+++ b/drivers/iio/adc/ad799x.c
@@ -143,9 +143,15 @@ static int ad799x_write_config(struct ad799x_state *st, u16 val)
143 case ad7998: 143 case ad7998:
144 return i2c_smbus_write_word_swapped(st->client, AD7998_CONF_REG, 144 return i2c_smbus_write_word_swapped(st->client, AD7998_CONF_REG,
145 val); 145 val);
146 default: 146 case ad7992:
147 case ad7993:
148 case ad7994:
147 return i2c_smbus_write_byte_data(st->client, AD7998_CONF_REG, 149 return i2c_smbus_write_byte_data(st->client, AD7998_CONF_REG,
148 val); 150 val);
151 default:
152 /* Will be written when doing a conversion */
153 st->config = val;
154 return 0;
149 } 155 }
150} 156}
151 157
@@ -155,8 +161,13 @@ static int ad799x_read_config(struct ad799x_state *st)
155 case ad7997: 161 case ad7997:
156 case ad7998: 162 case ad7998:
157 return i2c_smbus_read_word_swapped(st->client, AD7998_CONF_REG); 163 return i2c_smbus_read_word_swapped(st->client, AD7998_CONF_REG);
158 default: 164 case ad7992:
165 case ad7993:
166 case ad7994:
159 return i2c_smbus_read_byte_data(st->client, AD7998_CONF_REG); 167 return i2c_smbus_read_byte_data(st->client, AD7998_CONF_REG);
168 default:
169 /* No readback support */
170 return st->config;
160 } 171 }
161} 172}
162 173