[Linux-stm32] [BUG] stm32mp1 gpiod_to_irq() can cause "interrupt stealing"
Fuzzey, Martin
martin.fuzzey at flowbird.group
Wed Feb 24 18:19:27 UTC 2021
Hi Alexandre,
thank you for the very quick reply
On Wed, 24 Feb 2021 at 16:59, Alexandre TORGUE <alexandre.torgue at st.com> wrote:
> Even if this second interrupt is freed ? We have to check if we need to add a link between .alloc and .activate
> callbacks or move the protection.
>
The second *interrupt* cannot be freed because the request_irq()
returns -EBUSY (as it should) so it has never actually been allocated
for the driver.
There is no reverse function to gpiod_to_irq().
The second *gpio* could be freed but that doesn't clear the cached irq
number so even if the second gpio is freed and then gpiod_to_irq() is
called again for the *first* gpio the mapping is not updated.
Even if freeing the gpio were to restore the state somehow the driver
may not want to do that (for example it could have a degraded mode
where it can still function with just the gpio if it cannot get the
irq)
Regards,
Martin
More information about the Linux-stm32
mailing list