mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chang Yu <marcus.yu.56@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: "Chang Yu" <marcus.yu.56@gmail.com>,
	"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: Thu, 10 Sep 2026 12:22:01 -0700	[thread overview]
Message-ID: <aqMDWRRKMW7uYoGa@gmail.com> (raw)
In-Reply-To: <aqJzXvxHEWi2Ny1g@ashevche-desk.local>

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:
> 
> ...
> 
> > +}
> > +
> > +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.

> > +	return sysfs_emit(label, "%s\n", name);
> > +}
> 
> ...
> 

Best,
Chang

  reply	other threads:[~2026-09-10 19:22 UTC|newest]

Thread overview: 7+ 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-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  9:07   ` Andy Shevchenko
2026-09-10 19:22     ` Chang Yu [this message]
2026-09-11  5:48       ` Andy Shevchenko

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=aqMDWRRKMW7uYoGa@gmail.com \
    --to=marcus.yu.56@gmail.com \
    --cc=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=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

all inboxes | Powered by JetHome®