From: Robert Jarzmik <robert.jarzmik@free.fr>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: "Robert Jarzmik" <robert.jarzmik@free.fr>,
"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>,
"Andrew Lunn" <andrew@lunn.ch>,
linux-arm-kernel@lists.infradead.org,
"Haojian Zhuang" <haojian.zhuang@gmail.com>,
"Daniel Mack" <daniel@zonque.org>,
linux-kernel@vger.kernel.org
Subject: Re: PXA25x: GPIO driver fails probe due to resource conflict with pinctrl driver
Date: Fri, 09 Dec 2022 09:55:41 +0100 [thread overview]
Message-ID: <m2lenhdkdk.fsf@sopl295-1.home> (raw)
In-Reply-To: <Y5JlQLe+3la2XPZw@shell.armlinux.org.uk>
"Russell King (Oracle)" <linux@armlinux.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
next prev parent reply other threads:[~2022-12-09 8:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-07 11:25 PXA25x: GPIO driver fails probe due to resource conflict with pinctrl driver Jonathan Neuschäfer
2022-12-07 15:28 ` Andrew Lunn
2022-12-07 15:41 ` Russell King (Oracle)
2022-12-07 16:44 ` Jonathan Neuschäfer
2022-12-07 18:27 ` Russell King (Oracle)
2022-12-08 18:36 ` Jonathan Neuschäfer
2022-12-08 18:46 ` Robert Jarzmik
2022-12-08 19:10 ` Russell King (Oracle)
2022-12-08 20:19 ` Robert Jarzmik
2022-12-08 21:53 ` Jonathan Neuschäfer
2022-12-08 22:29 ` Russell King (Oracle)
2022-12-09 8:55 ` Robert Jarzmik [this message]
2022-12-07 16:40 ` Jonathan Neuschäfer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2lenhdkdk.fsf@sopl295-1.home \
--to=robert.jarzmik@free.fr \
--cc=andrew@lunn.ch \
--cc=daniel@zonque.org \
--cc=haojian.zhuang@gmail.com \
--cc=j.neuschaefer@gmx.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox