public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Erikas Bitovtas <xerikasxx@gmail.com>
To: "Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Erikas Bitovtas <xerikasxx@gmail.com>,
	 Andy Shevchenko <andriy.shevchenko@intel.com>
Subject: [PATCH v3 0/6] iio: light: vcnl4000: drop enum ID table and use device-managed register
Date: Fri, 10 Apr 2026 19:11:16 +0300	[thread overview]
Message-ID: <20260410-vcnl4000-drop-enum-v3-0-2ea2bc6f5dfb@gmail.com> (raw)

This patch series drops the enum ID table for device enumeration and
instead adds pointers to chip ID structs directly. Necessary
information about the device is then taken from i2c_get_match_data()
call. This removes the association between enum ID table and struct
table and allows for easier addition and removal of new devices.

Along with that, an iio_device_register() call is replaced with its
device-managed counterpart, to ensure that device is unregistered
automatically.

No functional changes are intended.

Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
---
Changes in v3:
- Reordered the commit for moving device tree entries into one line
  after the commit dropping enum table.
- After a failed iio_device_register(), added
  pm_runtime_set_suspended().
- Reordered device-managed IIO device register to come before setting
  autosuspend, as it was before this patch series.
- Link to v2: https://patch.msgid.link/20260405-vcnl4000-drop-enum-v2-0-7c8dc98c3974@gmail.com

Changes in v2:
- Moved device tree table entries into one line.
- Moved power state function in probe into a device-managed action.
- Replaced call to pm_runtime_set_active() and pm_runtime_enable() with
  its device-managed counterpart.
- Removed vcnl4000_remove function(), as all the clean up is done by
  device-managed functions.
- Link to v1: https://lore.kernel.org/r/20260401-vcnl4000-drop-enum-v1-0-ffd201f0c848@gmail.com

---
Erikas Bitovtas (6):
      iio: light: vcnl4000: validate device by prod ID instead of table ID
      iio: light: vcnl4000: drop enum id table in favor of chip structs
      iio: light: vcnl4000: move device tree entries into one line
      iio: light: vcnl4000: move power state function into device-managed action
      iio: light: vcnl4000: make pm_runtime_enable() device-managed
      iio: light: vcnl4000: register an IIO device with a device-managed function

 drivers/iio/light/vcnl4000.c | 276 +++++++++++++++++++------------------------
 1 file changed, 123 insertions(+), 153 deletions(-)
---
base-commit: 64450c940b89dd8fdc74178fba2f31718afd8c71
change-id: 20260401-vcnl4000-drop-enum-0238061fcff8

Best regards,
--  
Erikas Bitovtas <xerikasxx@gmail.com>


             reply	other threads:[~2026-04-10 16:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-10 16:11 Erikas Bitovtas [this message]
2026-04-10 16:11 ` [PATCH v3 1/6] iio: light: vcnl4000: validate device by prod ID instead of table ID Erikas Bitovtas
2026-04-10 16:11 ` [PATCH v3 2/6] iio: light: vcnl4000: drop enum id table in favor of chip structs Erikas Bitovtas
2026-04-10 16:11 ` [PATCH v3 3/6] iio: light: vcnl4000: move device tree entries into one line Erikas Bitovtas
2026-04-10 16:11 ` [PATCH v3 4/6] iio: light: vcnl4000: move power state function into device-managed action Erikas Bitovtas
2026-04-10 16:11 ` [PATCH v3 5/6] iio: light: vcnl4000: make pm_runtime_enable() device-managed Erikas Bitovtas
2026-04-10 16:11 ` [PATCH v3 6/6] iio: light: vcnl4000: register an IIO device with a device-managed function Erikas Bitovtas

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=20260410-vcnl4000-drop-enum-v3-0-2ea2bc6f5dfb@gmail.com \
    --to=xerikasxx@gmail.com \
    --cc=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 \
    /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