From: Linus Walleij <linus.walleij@linaro.org>
To: Andrew Bresticker <abrestic@chromium.org>
Cc: Alexandre Courbot <gnurou@gmail.com>,
Ralf Baechle <ralf@linux-mips.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
Linux MIPS <linux-mips@linux-mips.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Ezequiel Garcia <ezequiel.garcia@imgtec.com>,
James Hartley <james.hartley@imgtec.com>,
James Hogan <james.hogan@imgtec.com>,
Damien Horsley <Damien.Horsley@imgtec.com>,
Govindraj Raja <govindraj.raja@imgtec.com>
Subject: Re: [PATCH 2/2] pinctrl: Add Pistachio SoC pin control driver
Date: Thu, 19 Mar 2015 09:42:16 +0100 [thread overview]
Message-ID: <CACRpkdbXm_aPQU0-wV8yASts7n4QBd1dAe8-d40g2xy2KBAKEQ@mail.gmail.com> (raw)
In-Reply-To: <CAL1qeaHCKPeQnf8VPWmz_=uN1=_mxWbMGF+HuPZ_AYOqA+15JA@mail.gmail.com>
On Tue, Mar 17, 2015 at 5:56 PM, Andrew Bresticker
<abrestic@chromium.org> wrote:
[Me]
>> Sorry if I don't really know how things work now... :(
>> It seems like a logical way to me.
(...)
> 4) The ->set_mux() op must set the proper function for the pin.
> 5) The ->set_mux() op must also disable the GPIO function for the pin.
> To disable the GPIO function, the pinctrl driver must map the pin to a
> GPIO bank/offset and disable the GPIO via the GPIO bank's GPIO_EN
> register.
That sounds like the"GPIO" registers are actually involved in any
muxing usecase, meaning there is not really a clean split between
the pinctrl and GPIO hardware, the case I refer to as "GPIO mode
pitfalls" in Documentation/pinctrl.txt.
In such cases both halves of the driver(s) need to be aware of
the other, and that is what you seem to be wanting to achieve.
So I was wrong in thinking the GPIO device could be a separate
subdevice, the two parts are too dependent on each other.
So keep a single probe() function and let the two driver halves
poke into each others' registers.
Sorry for the fuzz...
Yours,
Linus Walleij
next prev parent reply other threads:[~2015-03-19 8:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-24 2:15 [PATCH 0/2] pinctrl: Support for IMG Pistachio Andrew Bresticker
2015-02-24 2:15 ` [PATCH 1/2] pinctrl: Add Pistachio SoC pin control binding document Andrew Bresticker
2015-03-06 11:37 ` Linus Walleij
[not found] ` <CACRpkdbCavYLk-Uo8hjTrGcGLJe6NEB9dVPVNm_fyd3eGccnEw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-06 18:10 ` Andrew Bresticker
[not found] ` <1424744104-14151-1-git-send-email-abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2015-02-24 2:15 ` [PATCH 2/2] pinctrl: Add Pistachio SoC pin control driver Andrew Bresticker
2015-03-06 11:55 ` Linus Walleij
2015-03-06 18:51 ` Andrew Bresticker
2015-03-17 12:16 ` Linus Walleij
2015-03-17 16:56 ` Andrew Bresticker
2015-03-19 8:42 ` Linus Walleij [this message]
2015-03-06 11:29 ` [PATCH 0/2] pinctrl: Support for IMG Pistachio Linus Walleij
[not found] ` <CACRpkdbCOHNPs5Y58h--X6pOVvYyxTrgcFhFyk5dWE+JLo=rhg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-06 18:07 ` Andrew Bresticker
2015-04-01 10:03 ` Ralf Baechle
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=CACRpkdbXm_aPQU0-wV8yASts7n4QBd1dAe8-d40g2xy2KBAKEQ@mail.gmail.com \
--to=linus.walleij@linaro.org \
--cc=Damien.Horsley@imgtec.com \
--cc=abrestic@chromium.org \
--cc=devicetree@vger.kernel.org \
--cc=ezequiel.garcia@imgtec.com \
--cc=gnurou@gmail.com \
--cc=govindraj.raja@imgtec.com \
--cc=james.hartley@imgtec.com \
--cc=james.hogan@imgtec.com \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/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;
as well as URLs for NNTP newsgroup(s).