Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b631e68e authored by Balachandra C S's avatar Balachandra C S
Browse files

drivers: net: can: Use interrupt type from device tree



Use proper interrupt type from the device tree for gpio interrupt
from CAN controller in qti-can driver as irq type may vary with
different targets.

Change-Id: If08c3f6d53fc6e8b7a55be47705c5a1841c0c913
Signed-off-by: default avatarBalachandra C S <balacs@codeaurora.org>
parent bad3170e
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1263,6 +1263,7 @@ static int qti_can_probe(struct spi_device *spi)
	int err, retry = 0, query_err = -1, i;
	struct qti_can *priv_data = NULL;
	struct device *dev;
	u32 irq_type;

	dev = &spi->dev;
	dev_info(dev, "qti_can_probe");
@@ -1369,8 +1370,11 @@ static int qti_can_probe(struct spi_device *spi)
		}
	}

	irq_type = irq_get_trigger_type(spi->irq);
	if (irq_type == IRQ_TYPE_NONE)
		irq_type = IRQ_TYPE_EDGE_FALLING;
	err = request_threaded_irq(spi->irq, NULL, qti_can_irq,
				   IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
				   irq_type | IRQF_ONESHOT,
				   "qti-can", priv_data);
	if (err) {
		LOGDE("Failed to request irq: %d", err);