diff options
author | Jeremy Fertic <jeremyfertic@gmail.com> | 2018-12-11 17:54:54 -0700 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2018-12-16 14:05:55 +0000 |
commit | 85a1c11913312132d0800ca2c1c42a011f96ea92 (patch) | |
tree | bb7bedcf4a94019c9de7a71da03f44fa4568871e | |
parent | 53a6f022b4fe8645468adaffca901dbf8c3c547e (diff) | |
download | linux-stable-85a1c11913312132d0800ca2c1c42a011f96ea92.tar.gz linux-stable-85a1c11913312132d0800ca2c1c42a011f96ea92.tar.bz2 linux-stable-85a1c11913312132d0800ca2c1c42a011f96ea92.zip |
staging: iio: adt7316: invert the logic of the check for an ldac pin
ADT7316_DA_EN_VIA_DAC_LDCA is set when the dac and ldac registers are being
used to update the dacs instead of the ldac pin. ADT7516_SEL_AIN3 is an adc
input that shares the ldac pin. Only set these bits if an ldac pin is not
being used.
This could be backported to stable, but note there are various
other bugs that probably make that a waste of time.
Signed-off-by: Jeremy Fertic <jeremyfertic@gmail.com>
Fixes: 35f6b6b86ede ("staging: iio: new ADT7316/7/8 and ADT7516/7/9 driver")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r-- | drivers/staging/iio/addac/adt7316.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c index 1fa4a4c2b4f3..e5e1f9d6357f 100644 --- a/drivers/staging/iio/addac/adt7316.c +++ b/drivers/staging/iio/addac/adt7316.c @@ -2130,7 +2130,7 @@ int adt7316_probe(struct device *dev, struct adt7316_bus *bus, return ret; } - if (chip->ldac_pin) { + if (!chip->ldac_pin) { chip->config3 |= ADT7316_DA_EN_VIA_DAC_LDCA; if ((chip->id & ID_FAMILY_MASK) == ID_ADT75XX) chip->config1 |= ADT7516_SEL_AIN3; |