Re: [PATCH 4/7] gpio: dwapb: Convert driver to using the GPIO-lib-based IRQ-chip
From: Serge Semin <hidden>
Date: 2020-07-27 21:50:16
Also in:
linux-gpio, lkml
On Sat, Jul 25, 2020 at 03:12:49PM +0300, Andy Shevchenko wrote:
On Sat, Jul 25, 2020 at 2:03 AM Serge Semin [off-list ref] wrote:quoted
On Thu, Jul 23, 2020 at 01:03:17PM +0300, Andy Shevchenko wrote:quoted
On Thu, Jul 23, 2020 at 04:38:55AM +0300, Serge Semin wrote:
...
quoted
quoted
quoted
+ /* This will let us handle the parent IRQ in the driver */ + girq->parents = NULL; + girq->num_parents = 0; + girq->parent_handler = NULL;quoted
quoted
Shan't we do this before request_irq() call (at least for consistency with the rest of the drivers)?Technically we shan't. Please elaborate which drivers you are referring to?All of them? Recent patches for IRQ chip template do something like girq = &...; girq->foo = bar; ... ret = request_irq(...); ...and here no more girq->baz = gaz; lines.quoted
Even the recent Linus' series "Use irqchip template" mostly does it in the same order.Funny, that's what I;m referring to.
It turns out my "mostly" was wrong in this matter. It's 4 out of 17 patches, which make the initialization in the same order as mine: drivers/gpio/gpio-max732x.c drivers/gpio/gpio-pca953x.c drivers/gpio/gpio-pcf857x.c drivers/gpio/gpio-adp5588.c while the rest of them does it in the order suggested by you: drivers/gpio/gpio-pci-idio-16.c drivers/gpio/gpio-pcie-idio-24.c drivers/gpio/gpio-104-idio-16.c drivers/gpio/gpio-104-dio-48e.c drivers/gpio/gpio-ws16c48.c drivers/gpio/gpio-rcar.c drivers/gpio/gpio-wcove.c drivers/pinctrl/pinctrl-amd.c drivers/gpio/gpio-crystalcove.c drivers/pinctrl/pinctrl-mcp23s08.c drivers/pinctrl/pinctrl-sx150x.c drivers/pinctrl/pinctrl-stmfx.c drivers/gpio/gpio-tc3589x.c Then, let's use the same order here as the most of the drivers do just for consistency. -Sergey
-- With Best Regards, Andy Shevchenko