Commit Graph

4 Commits

Author SHA1 Message Date
J. Nick Koston 18ad20a1bd Add binary sensors on interrupt-enabled hubs to exercise pin_mode path 2026-04-04 10:45:46 -10:00
J. Nick Koston 41e09c1e6c [mcp23xxx][pi4ioe5v6408] Add optional interrupt pin to eliminate polling
Extend interrupt_pin support to MCP23008, MCP23017, MCP23S08, MCP23S17,
and PI4IOE5V6408 GPIO expander components. Same approach as PCF8574/PCA9554:
when configured, the component disables its loop and only wakes on interrupt,
and the cache stays valid between interrupts so binary sensors return from
cache instead of doing I2C/SPI reads every loop iteration.

For MCP23xxx, the interrupt_pin config and C++ logic lives in the shared
MCP23XXXBase template class, so all four variants (I2C 8/16-pin, SPI
8/16-pin) inherit it automatically.

Inspired by jesserockz's work in #11959 which proposed a more comprehensive
interrupt-driven approach with per-pin interrupt status register reading.
This implementation takes a simpler path by leveraging the existing
CachedGpioExpander cache invalidation mechanism.
2026-04-04 09:12:09 -10:00
J. Nick Koston dcf2697a2a Group component tests to reduce CI time (#11134) 2025-10-12 07:21:45 +13:00
Keith Burzinski 4e4566361f [CI] Consolidate some tests (M) (#8202) 2025-02-05 12:05:59 +13:00