From f0df462f3ae1d10131f8ff7daa016ce1a8686727 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Tue, 18 Dec 2018 09:47:57 +0100 Subject: [PATCH] gpio: mxs: read pin level directly instead of using .get MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Calling readl directly instead of going through another function that results in the same result to remove some overhead. I didn't try to measure the performance gain, but IMHO there is little benefit from abstracting a GPIO register access in the GPIO driver. Signed-off-by: Uwe Kleine-König Signed-off-by: Linus Walleij --- drivers/gpio/gpio-mxs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c index ea874fd033a5..5e5437a2c607 100644 --- a/drivers/gpio/gpio-mxs.c +++ b/drivers/gpio/gpio-mxs.c @@ -84,7 +84,7 @@ static int mxs_gpio_set_irq_type(struct irq_data *d, unsigned int type) port->both_edges &= ~pin_mask; switch (type) { case IRQ_TYPE_EDGE_BOTH: - val = port->gc.get(&port->gc, d->hwirq); + val = readl(port->base + PINCTRL_DIN(port)) & pin_mask; if (val) edge = GPIO_INT_FALL_EDGE; else -- 2.20.1