aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/regmap.h
diff options
context:
space:
mode:
authorBartosz Golaszewski <bgolaszewski@baylibre.com>2018-12-07 14:04:52 +0100
committerMark Brown <broonie@kernel.org>2018-12-13 17:07:46 +0000
commitbc998a730367a69a1449320d321187d7414668fa (patch)
tree5229268e52f3dedd06da31bb9aabe430a6aeeac4 /include/linux/regmap.h
parentregmap: add a new macro:REGMAP_IRQ_REG_LINE(_id, _reg_bits) (diff)
downloadlinux-dev-bc998a730367a69a1449320d321187d7414668fa.tar.xz
linux-dev-bc998a730367a69a1449320d321187d7414668fa.zip
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>
Diffstat (limited to 'include/linux/regmap.h')
-rw-r--r--include/linux/regmap.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 3930f3331652..c54c778f3051 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -1137,6 +1137,9 @@ struct regmap_irq {
* @ack_invert: Inverted ack register: cleared bits for ack.
* @wake_invert: Inverted wake register: cleared bits are wake enabled.
* @type_invert: Invert the type flags.
+ * @type_in_mask: Use the mask registers for controlling irq type. For
+ * interrupts defining type_rising/falling_mask use mask_base
+ * for edge configuration and never update bits in type_base.
* @runtime_pm: Hold a runtime PM lock on the device when accessing it.
*
* @num_regs: Number of registers in each control bank.
@@ -1175,6 +1178,7 @@ struct regmap_irq_chip {
bool wake_invert:1;
bool runtime_pm:1;
bool type_invert:1;
+ bool type_in_mask:1;
int num_regs;