]> git.baikalelectronics.ru Git - kernel.git/commit
regmap: irq: add an option to clear status registers on unmask
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Wed, 19 Dec 2018 11:18:05 +0000 (12:18 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 19 Dec 2018 18:38:13 +0000 (18:38 +0000)
commit1a93b4d38a83ae1b8cee5547d81cb0b77ed4f447
treeb4b523aac45485555343e4ff9133c529a6ecd38e
parent734ef6188dceb69ed3af6eebc1d7a1384ef14044
regmap: irq: add an option to clear status registers on unmask

Some interrupt controllers whose interrupts are acked on read will set
the status bits for masked interrupts without changing the state of
the IRQ line.

Some chips have an additional "feature" where if those set bits are
not cleared before unmasking their respective interrupts, the IRQ
line will change the state and we'll interpret this as an interrupt
although it actually fired when it was masked.

Add a new field to the irq chip struct that tells the regmap irq chip
code to always clear the status registers before actually changing the
irq mask values.

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