Hi Andy
Thanks for the thorough review. Just one quick clarification inline.
On Thu, Sep 10, 2026 at 12:07:42PM +0300, Andy Shevchenko wrote:
On Wed, Sep 09, 2026 at 11:38:13PM -0700, Chang Yu wrote:
...
quoted
+}
+
+static int as7343_read_label(struct iio_dev *indio_dev,
+ struct iio_chan_spec const *chan, char *label)
+{
+ const char *name;
+
+ name = as7343_channel_label(chan);
+ if (!name)
+ return -EINVAL;
Why? Can't it be taken from DT?
These channel labels correspond to the physical optical channel
names defined by the datasheet. Each name corresponds to a
pre-defined range of wavelengths. They are fixed internal properties
of the chip, so IMO hardcoding them in the driver is more
approriate.
quoted
+ return sysfs_emit(label, "%s\n", name);
+}
...
Best,
Chang