• Bartosz Golaszewski's avatar
    regmap: irq: add an option to clear status registers on unmask · c82ea33e
    Bartosz Golaszewski authored
    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: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    c82ea33e
regmap-irq.c 22.6 KB