Linux IIO development
 help / color / mirror / Atom feed
* [PATCH v3 0/5] iio: light: vcnl4000: support shared IRQs
@ 2026-09-03  4:53 Tsz Shan Chan
  2026-09-03  4:53 ` [PATCH v3 1/5] iio: light: vcnl4000: use correct channel array size Tsz Shan Chan
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Tsz Shan Chan @ 2026-09-03  4:53 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko
  Cc: linux-iio, linux-kernel, Tsz Shan Chan

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@jacques.com.au

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@jacques.com.au

---
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@jacques.com.au>


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-09-03  8:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03  4:53 [PATCH v3 0/5] iio: light: vcnl4000: support shared IRQs Tsz Shan Chan
2026-09-03  4:53 ` [PATCH v3 1/5] iio: light: vcnl4000: use correct channel array size Tsz Shan Chan
2026-09-03  7:55   ` Andy Shevchenko
2026-09-03  4:53 ` [PATCH v3 2/5] iio: light: vcnl4000: clear DRDY interrupt when buffer disabled Tsz Shan Chan
2026-09-03  7:55   ` Andy Shevchenko
2026-09-03  4:53 ` [PATCH v3 3/5] iio: light: vcnl4000: refactor interrupt config functions Tsz Shan Chan
2026-09-03  4:53 ` [PATCH v3 4/5] iio: light: vcnl4000: Add IRQ disable callback on cleanup Tsz Shan Chan
2026-09-03  8:03   ` Andy Shevchenko
2026-09-03  4:53 ` [PATCH v3 5/5] iio: light: vcnl4000: add shared IRQ support Tsz Shan Chan
2026-09-03  8:07   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox