mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
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>
This commit is contained in:
parent
43fac3238c
commit
bc998a7303
2 changed files with 48 additions and 20 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue