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>
---
Erikas Bitovtas (3):
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: register an IIO device with a device-managed function
drivers/iio/light/vcnl4000.c | 208 +++++++++++++++++++++----------------------
1 file changed, 102 insertions(+), 106 deletions(-)
---
base-commit: 36ece9697e89016181e5ae87510e40fb31d86f2b
change-id: 20260401-vcnl4000-drop-enum-0238061fcff8
Best regards,
--
Erikas Bitovtas <xerikasxx@gmail.com>