mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Erikas Bitovtas <xerikasxx@gmail.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] iio: light: vcnl4000: drop enum id table in favor of chip structs
Date: Thu, 2 Apr 2026 11:21:57 +0300	[thread overview]
Message-ID: <ac4nJcb-w28ih7mK@ashevche-desk.local> (raw)
In-Reply-To: <20260401-vcnl4000-drop-enum-v1-2-ffd201f0c848@gmail.com>

On Wed, Apr 01, 2026 at 02:22:37PM +0300, Erikas Bitovtas wrote:
> Instead of creating an enum table with chip IDs, store pointers to
> structs directly. This drops the association between chip structs and
> enum IDs and allows for easier addition or removal of new devices.

...

>  static const struct of_device_id vcnl_4000_of_match[] = {
>  	{
>  		.compatible = "capella,cm36672p",
> -		.data = (void *)CM36672P,
> +		.data = &cm36672p_spec,
>  	},

Also can be collapsed to smaller number of LoC.

	{ .compatible = "capella,cm36672p", .data = &cm36672p_spec, },

But I fine with current approach. If you want to collapse, it's probably better
to do in a separate patch.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-04-02  8:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-01 11:22 [PATCH 0/3] iio: light: vcnl4000: drop enum ID table and use device-managed register Erikas Bitovtas
2026-04-01 11:22 ` [PATCH 1/3] iio: light: vcnl4000: validate device by prod ID instead of table ID Erikas Bitovtas
2026-04-01 11:22 ` [PATCH 2/3] iio: light: vcnl4000: drop enum id table in favor of chip structs Erikas Bitovtas
2026-04-02  8:21   ` Andy Shevchenko [this message]
2026-04-01 11:22 ` [PATCH 3/3] iio: light: vcnl4000: register an IIO device with a device-managed function Erikas Bitovtas
2026-04-02  8:20   ` 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=ac4nJcb-w28ih7mK@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=xerikasxx@gmail.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®