aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/chemical
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2020-04-20 02:28:47 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-04-25 14:34:51 +0100
commit98bcead07951ed76e1e85226c3a54d117e9f8b59 (patch)
treed207a70c8fc4c08cec826a5554f6a1bb326bfd5d /drivers/iio/chemical
parentMerge tag 'iio-fixes-for-5.7a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus (diff)
downloadlinux-dev-98bcead07951ed76e1e85226c3a54d117e9f8b59.tar.xz
linux-dev-98bcead07951ed76e1e85226c3a54d117e9f8b59.zip
iio: chemical: atlas-sensor: correct DO-SM channels
IIO_CONCENTRATION channel for the DO-SM shouldn't be indexed as there isn't more than one, and also ATLAS_CONCENTRATION_CHANNEL macro scan_index define steps on the IIO_TIMESTAMP channel. Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com> Fixes: a751b8e48018 (iio: chemical: atlas-sensor: add DO-SM module support) Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/chemical')
-rw-r--r--drivers/iio/chemical/atlas-sensor.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/iio/chemical/atlas-sensor.c b/drivers/iio/chemical/atlas-sensor.c
index 82d470561ad3..7b199ce16ecf 100644
--- a/drivers/iio/chemical/atlas-sensor.c
+++ b/drivers/iio/chemical/atlas-sensor.c
@@ -194,7 +194,19 @@ static const struct iio_chan_spec atlas_orp_channels[] = {
};
static const struct iio_chan_spec atlas_do_channels[] = {
- ATLAS_CONCENTRATION_CHANNEL(0, ATLAS_REG_DO_DATA),
+ {
+ .type = IIO_CONCENTRATION,
+ .address = ATLAS_REG_DO_DATA,
+ .info_mask_separate =
+ BIT(IIO_CHAN_INFO_RAW) | BIT(IIO_CHAN_INFO_SCALE),
+ .scan_index = 0,
+ .scan_type = {
+ .sign = 'u',
+ .realbits = 32,
+ .storagebits = 32,
+ .endianness = IIO_BE,
+ },
+ },
IIO_CHAN_SOFT_TIMESTAMP(1),
{
.type = IIO_TEMP,