regmap: irq: handle HW using separate rising/falling edge interrupts
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Fri, 7 Dec 2018 13:04:52 +0000 (14:04 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 13 Dec 2018 17:07:46 +0000 (17:07 +0000)
commitbc998a730367a69a1449320d321187d7414668fa
tree5229268e52f3dedd06da31bb9aabe430a6aeeac4
parent43fac3238c1d9363b2a93d8d56c2be0c29c64e6c
regmap: irq: handle HW using separate rising/falling edge interrupts

Some interrupt controllers use separate bits for controlling rising
and falling edge interrupts in the mask register i.e. they have one
interrupt for rising edge and one for falling.

We already handle the case where we have a single interrupt in the
mask register and a separate type configuration register.

Add a new switch to regmap_irq_chip which tells the framework to use
the mask_base address for configuring the edge of the interrupts that
define type_falling/rising_mask values.

For such interrupts we never update the type_base bits. For interrupts
that don't define type masks or their regmap irq chip doesn't set the
type_in_mask to true everything stays the same.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap-irq.c
include/linux/regmap.h