diff options
author | Ciprian Regus <ciprian.regus@analog.com> | 2022-09-16 17:09:21 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2022-09-21 20:42:54 +0300 |
commit | 2187cfeb362678dae2f6235b20a6ef658836b3d4 (patch) | |
tree | d2b023fbabb15eac40b33365f5fe0ab3c5d82e87 /drivers/iio/adc/ltc2497-core.c | |
parent | cc6fbf2672bba1c1042f8e5b8a61067f5d3a3214 (diff) | |
download | linux-2187cfeb362678dae2f6235b20a6ef658836b3d4.tar.xz |
drivers: iio: adc: ltc2497: LTC2499 support
The LTC2499 is a 16-channel (eight differential), 24-bit,
ADC with Easy Drive technology and a 2-wire, I2C interface.
Implement support for the LTC2499 ADC by extending the LTC2497
driver. A new chip_info struct is added to differentiate between
chip types and resolutions when reading data from the device.
Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/2499fe.pdf
Signed-off-by: Ciprian Regus <ciprian.regus@analog.com>
Link: https://lore.kernel.org/r/20220916140922.2506248-5-ciprian.regus@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc/ltc2497-core.c')
-rw-r--r-- | drivers/iio/adc/ltc2497-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/adc/ltc2497-core.c b/drivers/iio/adc/ltc2497-core.c index 2a485c8a1940..b2752399402c 100644 --- a/drivers/iio/adc/ltc2497-core.c +++ b/drivers/iio/adc/ltc2497-core.c @@ -95,7 +95,7 @@ static int ltc2497core_read_raw(struct iio_dev *indio_dev, return ret; *val = ret / 1000; - *val2 = 17; + *val2 = ddata->chip_info->resolution + 1; return IIO_VAL_FRACTIONAL_LOG2; |