Skip to content

Commit 98bcead

Browse files
mranostayjic23
authored andcommitted
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 <[email protected]> Fixes: a751b8e (iio: chemical: atlas-sensor: add DO-SM module support) Signed-off-by: Jonathan Cameron <[email protected]>
1 parent c532cc6 commit 98bcead

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

drivers/iio/chemical/atlas-sensor.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,19 @@ static const struct iio_chan_spec atlas_orp_channels[] = {
194194
};
195195

196196
static const struct iio_chan_spec atlas_do_channels[] = {
197-
ATLAS_CONCENTRATION_CHANNEL(0, ATLAS_REG_DO_DATA),
197+
{
198+
.type = IIO_CONCENTRATION,
199+
.address = ATLAS_REG_DO_DATA,
200+
.info_mask_separate =
201+
BIT(IIO_CHAN_INFO_RAW) | BIT(IIO_CHAN_INFO_SCALE),
202+
.scan_index = 0,
203+
.scan_type = {
204+
.sign = 'u',
205+
.realbits = 32,
206+
.storagebits = 32,
207+
.endianness = IIO_BE,
208+
},
209+
},
198210
IIO_CHAN_SOFT_TIMESTAMP(1),
199211
{
200212
.type = IIO_TEMP,

0 commit comments

Comments
 (0)