Thread (74 messages) 74 messages, 8 authors, 2020-06-10

Re: [PATCH v4 06/11] gpio: add support for the sl28cpld GPIO controller

From: Andy Shevchenko <hidden>
Date: 2020-06-05 21:19:29
Also in: linux-devicetree, linux-gpio, linux-hwmon, linux-pwm, linux-watchdog, lkml

On Fri, Jun 5, 2020 at 9:44 PM Michael Walle [off-list ref] wrote:
Am 2020-06-05 15:15, schrieb Andy Shevchenko:
quoted
On Fri, Jun 05, 2020 at 02:42:53PM +0200, Michael Walle wrote:
quoted
Am 2020-06-05 14:00, schrieb Andy Shevchenko:
quoted
On Fri, Jun 5, 2020 at 12:14 AM Michael Walle [off-list ref] wrote:
...
quoted
quoted
quoted
quoted
+       if (irq_support &&
Why do you need this flag? Can't simple IRQ number be sufficient?
I want to make sure, the is no misconfiguration. Eg. only GPIO
flavors which has irq_support set, have the additional interrupt
registers.
In gpio-dwapb, for example, we simple check two things: a) hardware
limitation
(if IRQ is assigned to a proper port) and b) if there is any IRQ comes
from DT,
ACPI, etc.
I can't follow you here. irq_support is like your (a); or the
"pp->idx == 0" in your example.
And you have type already. Why do you need to duplicate it? Moreover,
is it protection from wrong type to have interrupts?

You can move this all stuff under corresponding switch-case.
quoted
quoted
quoted
quoted
+           device_property_read_bool(&pdev->dev,
"interrupt-controller")) {
+               irq = platform_get_irq(pdev, 0);
+               if (irq < 0)
+                       return irq;
+
+               ret = sl28cpld_gpio_irq_init(&pdev->dev, gpio, regmap,
+                                            base, irq);
+               if (ret)
+                       return ret;
+
+               config.irq_domain =
regmap_irq_get_domain(gpio->irq_data);

-- 
With Best Regards,
Andy Shevchenko

_______________________________________________
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