From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Chang Yu <marcus.yu.56@gmail.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"Joshua Crofts" <joshua.crofts1@gmail.com>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, "Shi Hao" <i.shihao.999@gmail.com>,
"Jose A. Perez de Azpillaga" <azpijr@gmail.com>
Subject: Re: [PATCH v3 2/2] iio: light: add AS7343 multi-spectral sensor driver
Date: Fri, 11 Sep 2026 08:48:36 +0300 [thread overview]
Message-ID: <aqOWNJhnBRNQfexD@ashevche-desk.local> (raw)
In-Reply-To: <aqMDWRRKMW7uYoGa@gmail.com>
On Thu, Sep 10, 2026 at 12:22:01PM -0700, Chang Yu wrote:
> 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:
...
> > > + 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.
Please, make a comment on top of the string array, with probably citing the
datasheet table with the wavelength ranges.
/*
* Channel names as defined in the datasheet:
* // hypothetical example // ... - 200-300 nm
* ...
*/
static const char * const ..._names[] = {
...names...
};
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-09-11 5:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 6:38 [PATCH v3 0/2] Add support for AS7343 multi-spectral sensor Chang Yu
2026-09-10 6:38 ` [PATCH v3 1/2] dt-bindings: iio: light: add as7343 Chang Yu
2026-09-10 6:49 ` sashiko-bot
2026-09-11 8:40 ` Krzysztof Kozlowski
2026-09-10 6:38 ` [PATCH v3 2/2] iio: light: add AS7343 multi-spectral sensor driver Chang Yu
2026-09-10 6:59 ` sashiko-bot
2026-09-10 9:07 ` Andy Shevchenko
2026-09-10 19:22 ` Chang Yu
2026-09-11 5:48 ` Andy Shevchenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aqOWNJhnBRNQfexD@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=azpijr@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=i.shihao.999@gmail.com \
--cc=jic23@kernel.org \
--cc=joshua.crofts1@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcus.yu.56@gmail.com \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox