]> git.baikalelectronics.ru Git - kernel.git/commit
can: m_can: m_can_open(): remove IRQF_TRIGGER_FALLING from request_threaded_irq(...
authorMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 27 Nov 2020 07:35:12 +0000 (08:35 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 27 Nov 2020 09:49:20 +0000 (10:49 +0100)
commit1213c6670e485f1f491e5aabde981f25b5e3c1ed
tree7b4efc9798df09c679db9f9f56bc5d68f85641bf
parent3f21cca6053fea38c1d2bd6e157d2d7a6560b37e
can: m_can: m_can_open(): remove IRQF_TRIGGER_FALLING from request_threaded_irq()'s flags

The threaded IRQ handler is used for the tcan4x5x driver only. The IRQ pin of
the tcan4x5x controller is active low, so better not use IRQF_TRIGGER_FALLING
when requesting the IRQ. As this can result in missing interrupts.

Further, if the device tree specified the interrupt as "IRQ_TYPE_LEVEL_LOW",
unloading and reloading of the driver results in the following error during
ifup:

| irq: type mismatch, failed to map hwirq-31 for gpio@20a8000!
| tcan4x5x spi1.1: m_can device registered (irq=0, version=32)
| tcan4x5x spi1.1 can2: TCAN4X5X successfully initialized.
| tcan4x5x spi1.1 can2: failed to request interrupt

This patch fixes the problem by removing the IRQF_TRIGGER_FALLING from the
request_threaded_irq().

Fixes: 0b2c8dae4b28 ("can: m_can: Create a m_can platform framework")
Cc: Dan Murphy <dmurphy@ti.com>
Cc: Sriram Dash <sriram.dash@samsung.com>
Cc: Pankaj Sharma <pankj.sharma@samsung.com>
Link: https://lore.kernel.org/r/20201127093548.509253-1-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/m_can/m_can.c