mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Svyatoslav Ryhel <clamor95@gmail.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
	"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>,
	"Esben Haabendal" <esben@geanix.com>,
	"Kuppuswamy Sathyanarayanan"
	<sathyanarayanan.kuppuswamy@linux.intel.com>,
	"Uwe Kleine-König (The Capable Hub)"
	<u.kleine-koenig@baylibre.com>, "Pan Chuang" <panchuang@vivo.com>,
	"Hemanth Selam" <hemanth.selam@gmail.com>,
	"Antoniu Miclaus" <antoniu.miclaus@analog.com>,
	"Nikita Travkin" <nikita@trvn.ru>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/4] iio: light: ltr501: Switch to read_avail() op from manual attribute registration
Date: Mon, 9 Nov 2026 22:03:15 +0200	[thread overview]
Message-ID: <avInA0Qgi841Fd9f@ashevche-desk.local> (raw)
In-Reply-To: <20261108094253.83899-2-clamor95@gmail.com>

On Sun, Nov 08, 2026 at 11:42:50AM +0200, Svyatoslav Ryhel wrote:
> Switch to the read_avail() operation from manual attribute group
> registration. This eliminates the need for per-chip attribute_group
> structures and related ltr501_chip_info iio_info entries.
> 
> Adjust LTR501_INTENSITY_CHANNEL to account for the new
> info_mask_*_available layout, allowing the removal of _shared since all
> intensity channels share the same layout of available entries.

...

> +static const int int_time_avail[] = {
> +	0, 50000,
> +	0, 100000,
> +	0, 200000,
> +	0, 400000
> +};
> +
> +static const int samp_freq_avail[] = {
> +	20, 0,
> +	10, 0,
> +	5,  0,
> +	2,  0,
> +	1,  0,
> +	0,  500000
> +};

When an entry is not a clear terminator, add trailing comma.

On top of that it's better to use 2d arrays (yes, it will need some casting,
but this will make it clear that there is a tighten dependency between odd
and even indices).

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-11-09 20:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-08  9:42 [PATCH v3 0/4] iio: light: ltr501: Add LTR-659PS-01 prox sensor support Svyatoslav Ryhel
2026-11-08  9:42 ` [PATCH v3 1/4] iio: light: ltr501: Switch to read_avail() op from manual attribute registration Svyatoslav Ryhel
2026-11-09 20:03   ` Andy Shevchenko [this message]
2026-11-08  9:42 ` [PATCH v3 2/4] iio: light: ltr501: Switch to modern match mechanism Svyatoslav Ryhel
2026-11-08  9:42 ` [PATCH v3 3/4] dt-bindings: iio: light: ltr501: Document LTR659 proximity sensor Svyatoslav Ryhel
2026-11-08  9:42 ` [PATCH v3 4/4] iio: light: ltr501: Add support for the LTR-659PS-01 " Svyatoslav Ryhel
2026-11-08 21:48   ` kernel test robot
2026-11-09 20:04     ` Andy Shevchenko
2026-11-09 20:07       ` Svyatoslav Ryhel

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=avInA0Qgi841Fd9f@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=antoniu.miclaus@analog.com \
    --cc=clamor95@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=esben@geanix.com \
    --cc=hemanth.selam@gmail.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nikita@trvn.ru \
    --cc=nuno.sa@analog.com \
    --cc=panchuang@vivo.com \
    --cc=robh@kernel.org \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=u.kleine-koenig@baylibre.com \
    /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®