Thread (9 messages) 9 messages, 4 authors, 19d ago

Re: [PATCH v3 2/2] iio: light: add AS7343 multi-spectral sensor driver

From: Chang Yu <hidden>
Date: 2026-09-10 19:22:06
Also in: linux-iio, lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help