Skip to content

gpio: pca953x: Fix TCA6418 multi-bank I/O, caching, and IRQs

Maria Garcia linux-gpio lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2gpio: pca953x: Fix TCA6418 bulk transfers and input cachingdrivers/gpio/gpio-pca953x.c+35 -60 replies
2/2gpio: pca953x: Fix TCA6418 interrupt handlingdrivers/gpio/gpio-pca953x.c+66 -130 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchGuy Morand
1/2T-b
2/2T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] gpio: pca953x: Fix TCA6418 multi-bank I/O, caching, and IRQs

This series fixes multi-bank register access, input register caching, and interrupt handling for the TI TCA6418E GPIO expander in gpio-pca953x:

1. Disable REG_ADDR_AI (0x80) for TCA6418_TYPE so multi-byte reads and writes advance sequentially across all three banks, reverse Bank 0 bit order (bitrev8) in bulk read/write paths to match the datasheet's MSB-first layout, and mark the input status registers (0x14..0x16) as volatile so reads do not return stale cached values.

2. Support TCA6418 interrupt setup, edge configuration (GPIO_INT_LVL), masking (GPIO_INT_EN), status decoding (GPIO_INT_STAT), and W1C acknowledgment (INT_STAT) by reusing the existing pca953x paths, while rejecting unsupported IRQ_TYPE_EDGE_BOTH triggers.

Tested on TI TCA6418E hardware across all three banks (single-pin and multi-pin reads/writes, input volatility, interrupts). Also, independently tested by Guy Morand on his hardware.

Maria Garcia (2):
gpio: pca953x: Fix TCA6418 bulk transfers and input caching
gpio: pca953x: Fix TCA6418 interrupt handling

 drivers/gpio/gpio-pca953x.c | 120 ++++++++++++++++++++++++++++++------
 1 file changed, 101 insertions(+), 19 deletions(-)
Signature · 1 line
2.52.0