Re: [PATCH v5 2/2] iio: light: isl76682: Add ISL76682 driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux