[PATCH v3 0/5] iio: light: vcnl4000: support shared IRQs

From: Tsz Shan Chan

Date: Thu Sep 03 2026 - 00:54:27 EST


This series contains changes for the vcnl4000 driver.

Patch 1 makes .num_channels match .channels for vcnl4200. vcnl4040 and
vcnl4000 channel arrays have the same size, so no functional change.

Patch 2 prepares the driver for level-triggered irq by making sure the
DRDY interrupt is explicitly cleared when the iio buffer is disabled.

Patch 3 refactors the interrupt configuration help functions. It also
standardizes the hardware disable order (clearing INT_CTRL before
COMMAND).

Patch 4 adds a devm action to explicitly disable hardware interrupts
during driver removal. This prevents unhandled interrupt during devm
teardown.

Patch 5 adds shared IRQ support. It changes the trigger type from
falling edge to low level and adds IRQF_SHARED. The IRQ handlers return
IRQ_NONE when the device did not generate the interrupt.

---
Changes in v3:
- 2/5: Clear the DRDY interrupt when the IIO buffer is disabled to
prevent interrupt storms (sashiko)
- 3/5: Refactor interrupt configuration and adjust the vcnl4010/4020
disable order to safely stop interrupt generation.
- 4/5: Add a devm action to disable hardware interrupts during driver
removal (sashiko)
- Link to v2: https://lore.kernel.org/r/20260814-vcnl4000-v2-0-9b771290cc1d@xxxxxxxxxxxxxx

Changes in v2:
- 1/2: Clarify in the commit message that the channel arrays have the
same size.
- 2/2: Drop IRQ trigger type checking and use IRQF_TRIGGER_LOW directly.
- 2/2: Check the interrupt source bits handled by the driver.
- Link to v1: https://lore.kernel.org/r/20260811-vcnl4000-v1-0-50e7fb657692@xxxxxxxxxxxxxx

---
Tsz Shan Chan (5):
iio: light: vcnl4000: use correct channel array size
iio: light: vcnl4000: clear DRDY interrupt when buffer disabled
iio: light: vcnl4000: refactor interrupt config functions
iio: light: vcnl4000: Add IRQ disable callback on cleanup
iio: light: vcnl4000: add shared IRQ support

drivers/iio/light/vcnl4000.c | 173 ++++++++++++++++++++++++++++++++-----------
1 file changed, 130 insertions(+), 43 deletions(-)
---
base-commit: 940de590b839f71d6dc846160534bf202401b8b7
change-id: 20260810-vcnl4000-02e19f70e706

Best regards,
--
Tsz Shan Chan <tchan@xxxxxxxxxxxxxx>