[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <m2lenhdkdk.fsf@sopl295-1.home>
Date: Fri, 09 Dec 2022 09:55:41 +0100
From: Robert Jarzmik <robert.jarzmik@...e.fr>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: Robert Jarzmik <robert.jarzmik@...e.fr>,
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
"Russell King (Oracle)" <linux@...linux.org.uk> writes:
> 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).
It does.
Basically it tries pinctrl first, and falls back to direct
registers
access. Here is a small extract of the gpio direction manipulation
in
gpio-pxa.c :
if (pxa_gpio_has_pinctrl()) {
ret = pinctrl_gpio_direction_output(chip->base +
offset);
if (ret)
return ret;
}
spin_lock_irqsave(&gpio_lock, flags);
tmp = readl_relaxed(base + GPDR_OFFSET);
... blablabal we set the bit, and write back the register.
Cheers.
--
Robert
Powered by blists - more mailing lists