From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pinctrl: Add generic pinctrl-simple driver that supports omap2+ padconf
Date: Wed, 9 May 2012 14:08:11 -0700 [thread overview]
Message-ID: <20120509210811.GX5088@atomide.com> (raw)
In-Reply-To: <4FAAD08D.1050806@wwwdotorg.org>
* Stephen Warren <swarren@wwwdotorg.org> [120509 13:19]:
> On 05/04/2012 03:57 PM, Tony Lindgren wrote:
> > * Stephen Warren <swarren@wwwdotorg.org> [120504 12:27]:
> >> On 05/02/2012 11:24 AM, Tony Lindgren wrote:
> >>
> >>> diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-simple.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-simple.txt
> ...
> >> On the other hand, I worry about whether using "pinctrl-simple" here as
> >> the compatible value is going to cause issues:
> >>
> >> Certainly, this is a pretty simple driver, and most likely reasonably
> >> generic an applicable to many SoCs. However, it doesn't cover a bunch of
> >> cases that I'd still consider "simple". For example, what if each pin
> >> has a separate mux and pinconf register? There are probably many such
> >> small cases that would add up to something more complex. to cover those
> >> cases, will we be able to extend pinctrl-simple to cover them, and
> >> continue to be backwards compatible, or will we need to create a
> >> binding/driver for pinctrl-simple-1, pinctrl-simple-2, pinctrl-simple-3
> >> each of which covers some different, yet still simple, configuration?
> >
> > Yes getting the binding right is the critical part here, everything else
> > can be added as needed. I was thinking about using separate properties
> > for auxilary registers, but now thinking about it a bit more, it may not
> > be sufficient.
> >
> > How about we make some of these properties into arrays? For example:
> >
> > #pinctrl-cells = 6;
> > pinctrl-simple,function-mask = <0x0000ffff 0x0000ffff 0xffff0000>;
> > pinctrl-simple,function-off = <0x7 0x7 0x70000>;
> > pinctrl-simple,pinconf-mask = <0xffff0000 0xffff0000 0x0000ffff>;
>
> I'm not sure what the 3 entries in the array are meant to describe?
If you have let's say three registers per pin, those would be the
related function and pinconf masks for those registers.
> > Because we need to specify GPIO for some pins. There may be additional flags
>
> What do you mean by "specify GPIO"?
>
> Nothing in this pinctrl-simple binding seems to imply that it's also a
> GPIO controller.
It is not a GPIO controller, but eventually needs to deal with existing
GPIO controllers.
> If "GPIO" is one of the functions that can be mux'd onto a pin, then I'd
> expect that to be represented in exactly the same way as any other
> function that could be mux'd onto the pin.
Right. But additionally we also need to know the mux register to GPIO
mapping for things like irq_set_irq_wake()/enable_irq_wake()/disable_irq_wake()
that may be set dynamically depending on what the user wants.
> So, I'm not sure what GPIO-related information you want to represent.
It seems that we should be able to do pinctrl_request_gpio that uses
an external GPIO controller and also sets up the desired wake-up flags
as needed. Anyways, not needed yet.
> > too, we do have external DMA request lines for few pins available.. I'm not
> > saying pinctrl fwk should know about that, but it's a similar mapping of pins
> > to GPIO lines.
>
> Aren't DMA request lines also just another function that can be mux'd
> onto a pin?
Yes it's a function for routing the signal. But that also needs to be
configured in the DMA controller. Right now there's no need to have
that mapping in the binding.
Regards,
Tony
prev parent reply other threads:[~2012-05-09 21:08 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-02 17:24 [PATCH] pinctrl: Add generic pinctrl-simple driver that supports omap2+ padconf Tony Lindgren
2012-05-03 6:51 ` Jean-Christophe PLAGNIOL-VILLARD
2012-05-03 15:27 ` Tony Lindgren
2012-05-03 22:34 ` Stephen Warren
2012-05-04 4:43 ` Jean-Christophe PLAGNIOL-VILLARD
2012-05-04 15:03 ` Tony Lindgren
2012-05-04 15:32 ` Jean-Christophe PLAGNIOL-VILLARD
2012-05-04 16:34 ` Tony Lindgren
2012-05-04 16:38 ` Jean-Christophe PLAGNIOL-VILLARD
2012-05-04 18:55 ` Stephen Warren
2012-05-04 22:08 ` Tony Lindgren
2012-05-09 20:19 ` Stephen Warren
2012-05-09 20:49 ` Tony Lindgren
2012-05-10 17:05 ` Stephen Warren
2012-05-10 17:27 ` Tony Lindgren
2012-05-11 19:17 ` Stephen Warren
2012-05-11 19:51 ` Tony Lindgren
2012-05-11 21:04 ` Stephen Warren
2012-05-11 21:18 ` Tony Lindgren
2012-05-12 23:49 ` Linus Walleij
2012-05-14 18:38 ` Stephen Warren
2012-05-15 20:07 ` Tony Lindgren
2012-05-16 7:14 ` Linus Walleij
2012-05-16 15:53 ` Stephen Warren
2012-05-05 2:04 ` Jean-Christophe PLAGNIOL-VILLARD
2012-05-09 20:24 ` Stephen Warren
2012-05-09 9:09 ` Linus Walleij
2012-05-09 20:50 ` Tony Lindgren
2012-05-04 19:23 ` Stephen Warren
2012-05-04 21:57 ` Tony Lindgren
2012-05-09 20:16 ` Stephen Warren
2012-05-09 21:08 ` Tony Lindgren [this message]
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=20120509210811.GX5088@atomide.com \
--to=tony@atomide.com \
--cc=linux-arm-kernel@lists.infradead.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).