regmap: Add a reusable irq_chip for regmap based interrupt controllers
Subsystems (2)
PATCH 1/1 regmap: Add a reusable irq_chip for regmap based interrupt controllers
There seem to be lots of regmap-using devices with very similar interrupt controllers with a small bank of interrupt registers and mask registers with an interrupt per bit. This won't cover everything but it's a good start.
Each chip supplies a base for the status registers, a base for the mask registers, an optional base for writing acknowledgements (which may be the same as the status registers) and an array of bits within each of these register banks which indicate the interrupt.
There is an assumption that the bit for each interrupt will be the same in each of the register banks.
Signed-off-by Mark Brown <[email protected]>
--- drivers/base/regmap/Kconfig | 3 + drivers/base/regmap/Makefile | 1 + drivers/base/regmap/regmap-irq.c | 286 ++++++++++++++++++++++++++++++++++++++ include/linux/regmap.h | 47 ++++++ 4 files changed, 337 insertions(+), 0 deletions(-) create mode 100644 drivers/base/regmap/regmap-irq.c
drivers/base/regmap/Kconfig +3 -0
@@ -13,3 +13,6 @@ config REGMAP_I2C config REGMAP_SPI tristate + +config REGMAP_IRQ + bool
drivers/base/regmap/Makefile +1 -0
@@ -3,3 +3,4 @@ obj-$(CONFIG_REGMAP) += regcache-rbtree.o regcache-lzo.o obj-$(CONFIG_DEBUG_FS) += regmap-debugfs.o obj-$(CONFIG_REGMAP_I2C) += regmap-i2c.o obj-$(CONFIG_REGMAP_SPI) += regmap-spi.o +obj-$(CONFIG_REGMAP_IRQ) += regmap-irq.o
drivers/base/regmap/regmap-irq.c new file +286 -0
286 lines not on this page · raw message
include/linux/regmap.h +47 -0
51 lines not on this page · raw message
Signature · 1 line
1.7.6.3