pinctrl: baytrail: Set IRQCHIP_SET_TYPE_MASKED flag on the irqchip
authorHans de Goede <hdegoede@redhat.com>
Mon, 22 Nov 2021 22:04:23 +0000 (23:04 +0100)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 23 Nov 2021 13:38:49 +0000 (15:38 +0200)
commit6b4542664c2d1fc7a770f0a4182ef5e36672d313
treeefad25fee244151f797c68cae1bd1f95d8fc937a
parentf7c151d86487eec720f52843133bce270b07fecc
pinctrl: baytrail: Set IRQCHIP_SET_TYPE_MASKED flag on the irqchip

The byt_irq_type function ends with the IRQ masked, this means that calls
to irq_set_irq_type() while the IRQ is enabled end up masking it, which
is wrong. Add the IRQCHIP_SET_TYPE_MASKED flag to fix this.

This will make the IRQ core call mask() + unmask() on the IRQ around
a set_type() call when the IRQ is enabled at the type of the call.

Note in practice irq_set_irq_type() getting called while the IRQ is enabled
almost never happens. I hit this with a buggy DSDT where a wrongly active
(_STA returns 0xf) I2C ACPI devices point to an IRQ already in use by an
_AEI handler, leading to the irq_set_irq_type() call in
acpi_dev_gpio_irq_get_by() getting called while the IRQ is enabled.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/pinctrl/intel/pinctrl-baytrail.c