On 11/26/23 20:33, Dr.-Ing. Andre Werner wrote:
[...]
+static int isl76682_write_raw(struct iio_dev *indio_dev,
+ struct iio_chan_spec const *chan,
+ int val, int val2, long mask)
+{
+ struct isl76682_chip *chip = iio_priv(indio_dev);
+ int i;
+
+ if (chan->type != IIO_LIGHT && chan->type != IIO_INTENSITY)
+ return -EINVAL;
In my understanding, this is not necessary as you use that 'iio_chan_spec' to specify
the channels available at all. So there will be no other channel types created by the IIO environment, I think.
That's a good point, I think we can drop it in this case and the next one.
Jonathan , is there any reason you can think of why this shouldn't be
dropped ?
I'll add it into V6, thanks.