Thread (3 messages) 3 messages, 3 authors, 2020-12-13

Re: [PATCH] gpio: aspeed: Lock GPIO pin used as IRQ

From: Andrew Jeffery <hidden>
Date: 2020-12-13 23:39:53
Also in: linux-aspeed, linux-gpio, lkml, openbmc


On Fri, 11 Dec 2020, at 00:44, Andy Shevchenko wrote:
On Thu, Dec 10, 2020 at 9:36 AM Troy Lee [off-list ref] wrote:
quoted
GPIO pins can be used as IRQ indicators. When they do,
those pins should be flaged with locks to avoid kernel
flagged
quoted
warning message.
...
quoted
@@ -651,6 +651,13 @@ static int aspeed_gpio_set_type(struct irq_data *d, unsigned int type)
quoted
+       rc = gpiochip_lock_as_irq(&gpio->chip, d->hwirq);
+       if (rc) {
+               dev_err(gpio->chip.parent, "unable to lock GPIO %lu as IRQ\n",
+                       d->hwirq);
+               return rc;
+       }
It's a copy'n'paste of generic code. Why do you need it in an unusual
place, i.e. ->irq_set_type() IIUC?
Can you elaborate about an issue, because this seems to be a hack?
Yep - Troy please provide more information. What was the warning you saw? How
were the GPIOs allocated on the system that triggered the warning? What did you
do to trigger the warning?

Andrew

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help