From: James Hogan <james.hogan@imgtec.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Grant Likely" <grant.likely@secretlab.ca>,
Rob Herring <rob.herring@calxeda.com>,
"devicetree-discuss@lists.ozlabs.org"
<devicetree-discuss@lists.ozlabs.org>,
Rob Landley <rob@landley.net>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>
Subject: Re: [PATCH 5/8] pinctrl-tz1090: add TZ1090 pinctrl driver
Date: Tue, 14 May 2013 13:22:33 +0100 [thread overview]
Message-ID: <51922C89.30403@imgtec.com> (raw)
In-Reply-To: <CACRpkdbJpnpZwoCqtFk+U9fsJXPLw+AhPBSCxawS2-QwAjBftA@mail.gmail.com>
On 14/05/13 12:52, Linus Walleij wrote:
> On Fri, May 3, 2013 at 5:06 PM, James Hogan <james.hogan@imgtec.com> wrote:
>> [me]
>>> Thus this part of the problem (poking that "select" bit)
>>> should be handled by the pinmux part of the driver.
>>>
>>> The pinconf part does not need to know about it.
>>
>> Okay, so how would you recommend handling the case of a pin in a muxing
>> pingroup that shouldn't be put into peripheral mode?
>>
>> E.g. imagine an 18bit display is wired to the (24bit) tft pins (which
>> are muxed as a group to "tft" function), and the least significant tft
>> pins are used as GPIOs to control something like board power supplies.
>>
>> Without using pinconf I think the muxing pingroups would have to overlap
>> like below (is that acceptable?):
>
> I don't know if I understand your example correctly but are you after
> this part of the documentation from Documentation/pinctrl.txt:
>
> Pinmux conventions
> ==================
> (...)
> It is possible to map several groups to the same combination of device,
> pin controller and function. This is for cases where a certain function on
> a certain pin controller may use different sets of pins in different
> configurations.
I think that's the other way around, i.e. that's talking about mapping
several pingroups to the same function. The next paragraph is closer to
the problem:
Documentation/pinctrl.txt
> - PINS for a certain FUNCTION using a certain PIN GROUP on a certain
> PIN CONTROLLER are provided on a first-come first-serve basis, so if some
> other device mux setting or GPIO pin request has already taken your physical
> pin, you will be denied the use of it. To get (activate) a new setting, the
> old one has to be put (deactivated) first.
In my example the tft pingroup contains all the tft pins, but I might
want a particular pin inside that pingroup to never be controlled by the
mux (using the per-pin mux disable (SELECT) bits).
So if I use pinmux I'd have something like:
* "tft" pingroup maps to "tft" function
* "tft_green0" pingroup (containing individual pin inside "tft"
pingroup) maps to "none" function to disable muxing (or the inverse,
with each pin in use mapping to "periph" to enable muxing).
in which case the pin has multiple muxes "controlling" it (even though
they're sort of nested). The above paragraph seems to condemn this
arrangement.
Or using pinconf I'd have something like:
* "tft" pingroup maps to "tft" function
* "tft_green0" pin (in "tft" pingroup) has pinconf "no-periph" (or the
inverse, with each one in use having pinconf "periph")
Or modifying the pinctrl subsystem maybe something like:
* [optional: particular named pins in] "tft" pingroup map to "tft" function
that way enabling a mux doesn't necessarily apply to all pins in the
group, and drivers for hardware that doesn't support partial enabling of
the mux can reject it (I might experiment with this if I get the time).
Does that make more sense?
Cheers
James
next prev parent reply other threads:[~2013-05-14 12:22 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-23 14:33 [PATCH 0/8] Add some TZ1090 SoC infrastructure James Hogan
2013-04-23 14:33 ` [PATCH 1/8] metag: of_platform_populate from arch generic code James Hogan
2013-04-23 14:33 ` [PATCH 2/8] metag: minimal TZ1090 (Comet) SoC infrastructure James Hogan
2013-04-23 15:25 ` Arnd Bergmann
2013-04-23 16:06 ` James Hogan
2013-04-24 13:26 ` Catalin Marinas
2013-04-24 14:51 ` James Hogan
2013-04-25 15:21 ` James Hogan
2013-04-23 14:33 ` [PATCH 3/8] irq-imgpdc: add ImgTec PDC irqchip driver James Hogan
2013-04-23 15:09 ` Thomas Gleixner
2013-04-24 9:14 ` James Hogan
2013-04-24 9:32 ` Thomas Gleixner
2013-04-25 11:25 ` James Hogan
2013-04-23 14:33 ` [PATCH 4/8] metag: tz1090: add <asm/soc-tz1090/gpio.h> James Hogan
2013-04-25 21:52 ` Linus Walleij
2013-04-23 14:33 ` [PATCH 5/8] pinctrl-tz1090: add TZ1090 pinctrl driver James Hogan
2013-04-25 22:39 ` Linus Walleij
2013-04-26 11:54 ` James Hogan
2013-05-03 9:13 ` Linus Walleij
2013-05-03 12:23 ` James Hogan
2013-05-03 13:03 ` Linus Walleij
2013-05-03 15:06 ` James Hogan
2013-05-14 11:52 ` Linus Walleij
2013-05-14 12:22 ` James Hogan [this message]
2013-05-15 19:07 ` Linus Walleij
2013-05-16 9:12 ` James Hogan
2013-05-17 6:47 ` Linus Walleij
2013-04-23 14:33 ` [PATCH 6/8] gpio-tz1090: add TZ1090 gpio driver James Hogan
2013-04-25 23:01 ` Linus Walleij
2013-04-26 9:22 ` James Hogan
2013-05-03 8:49 ` Linus Walleij
2013-05-03 9:09 ` James Hogan
2013-05-15 19:09 ` Linus Walleij
2013-04-23 14:33 ` [PATCH 7/8] pinctrl-tz1090-pdc: add TZ1090 PDC pinctrl driver James Hogan
2013-04-23 14:33 ` [PATCH 8/8] gpio-tz1090pdc: add TZ1090 PDC gpio driver James Hogan
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=51922C89.30403@imgtec.com \
--to=james.hogan@imgtec.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=linus.walleij@linaro.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
/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