gpio: 104-dio-48e: Migrate to the regmap-irq API
authorWilliam Breathitt Gray <william.gray@linaro.org>
Tue, 27 Dec 2022 14:09:40 +0000 (09:09 -0500)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 30 Jan 2023 14:55:27 +0000 (15:55 +0100)
commit2f7e845f512fdcdafdc922f23a91e560ef33ce4a
tree870282f50fefed3017105e164bcca5b7ae00aa39
parent8978277c229b9502aba4654b1d6ec59c819e82ea
gpio: 104-dio-48e: Migrate to the regmap-irq API

The regmap API supports IO port accessors so we can take advantage of
regmap abstractions rather than handling access to the device registers
directly in the driver.

For the 104-dio-48e we have the following IRQ registers (0xB and 0xF):

    Base Address +B (Write): Enable Interrupt
    Base Address +B (Read): Disable Interrupt
    Base Address +F (Read/Write): Clear Interrupt

Any write to 0xB will enable interrupts, while any read will disable
interrupts. Interrupts are cleared by a write to 0xF. There's no IRQ
status register, so software has to assume that if an interrupt is
raised then it was for the 104-DIO-48E device.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/Kconfig
drivers/gpio/gpio-104-dio-48e.c