[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y5JlQLe+3la2XPZw@shell.armlinux.org.uk>
Date: Thu, 8 Dec 2022 22:29:20 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Robert Jarzmik <robert.jarzmik@...e.fr>
Cc: Jonathan Neuschäfer <j.neuschaefer@....net>,
Andrew Lunn <andrew@...n.ch>,
linux-arm-kernel@...ts.infradead.org,
Haojian Zhuang <haojian.zhuang@...il.com>,
Daniel Mack <daniel@...que.org>, linux-kernel@...r.kernel.org
Subject: Re: PXA25x: GPIO driver fails probe due to resource conflict with
pinctrl driver
On Thu, Dec 08, 2022 at 09:19:12PM +0100, Robert Jarzmik wrote:
>
> "Russell King (Oracle)" <linux@...linux.org.uk> writes:
> > From a quick look, I think this commit is to blame:
> >
> > 542c25b7a209 drivers: gpio: pxa: use devm_platform_ioremap_resource()
> >
> > Someone "helpfully" making this change:
> >
> > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > - if (!res)
> > - return -EINVAL;
> > - gpio_reg_base = devm_ioremap(&pdev->dev, res->start,
> > - resource_size(res));
> > +
> > + gpio_reg_base = devm_platform_ioremap_resource(pdev, 0);
> >
> > which introduces request_mem_region() to the PXA GPIO driver, resulting
> > in this resource clash.
> You're right.
>
> Now, as for Jonathan, there are 2 options :
> - first one : revert the patch Russell pointed out
> - second one : a lot of work, detailed below :
>
> Given that Arnd is removing legacy platformdata code, that will only leave
> the
> device-tree one, which works only with the pinctrl driver enabled.
> That gives the opportunity to drop the use of GPDR from the gpio-pxa driver,
> and now we can map with separate iomem ressources pinctrl-pxa and gpio-pxa.
Does the GPIO driver talk to the pinctrl driver to switch GPIOs between
input and output mode? If it does, that's fine. If not, that can cause
regressions, as GPIOs may need to be switched between input and output
mode at runtime (e.g. for I2C gpio-based bitbang).
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists