From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] arm: kirkwood: factor pinmux descriptors for OpenBlocks A6
Date: Tue, 26 Mar 2013 20:48:29 +0100 [thread overview]
Message-ID: <20130326194829.GG631@lunn.ch> (raw)
In-Reply-To: <20130322164440.5e5735d7@skate>
On Fri, Mar 22, 2013 at 04:44:40PM +0100, Thomas Petazzoni wrote:
> Dear Andrew Lunn,
>
> On Wed, 6 Mar 2013 19:16:48 +0100, Andrew Lunn wrote:
> > On Wed, Mar 06, 2013 at 05:23:40PM +0100, Thomas Petazzoni wrote:
> > > The OpenBlocks A6 .dts file was using a long list of pinmux
> > > descriptors to select each GPIO of the external GPIO connector and the
> > > internal DIP switch, for no apparent reason. This commit factors those
> > > GPIO pins into two descriptors: one for the external GPIO connector
> > > and one for the internal DIP switch.
> >
> > Hi Thomas
> >
> > There is no need to pinmux gpio pins at all. The pinctrl driver does
> > it when the gpio driver requests the pins.
> >
> > This stems from an error i made. I also didn't know this and added
> > hogs for gpio pins as i converted some boards. Others have then just
> > cut/paste my error.....
>
> I was looking at this today to send an updated version of those
> patches. However, it turns out that having the pinctrl-0 property to
> associate pinmux configurations to a device has an advantage: pinctrl
> knows about this association.
>
> If you keep the pinctrl-0 property in gpio-leds and gpio-keys,
> then /sys/kernel/debug/pinctrl/f1010000.pinctrl/pinmux-pins looks like
> this:
>
> ======================================================================
> pin 38 (PIN38): gpio_keys.2 mvebu-gpio:38 function gpio group mpp38
> pin 39 (PIN39): (MUX UNCLAIMED) (GPIO UNCLAIMED)
> pin 40 (PIN40): (MUX UNCLAIMED) (GPIO UNCLAIMED)
> pin 41 (PIN41): gpio-leds.1 mvebu-gpio:41 function gpio group mpp41
> pin 42 (PIN42): gpio-leds.1 mvebu-gpio:42 function gpio group mpp42
> pin 43 (PIN43): gpio-leds.1 mvebu-gpio:43 function gpio group mpp43
> ======================================================================
>
> On the other hand, if you remove the pinctrl-0 property, the same file
> looks like this:
>
> ======================================================================
> pin 38 (PIN38): (MUX UNCLAIMED) mvebu-gpio:38
> pin 39 (PIN39): (MUX UNCLAIMED) (GPIO UNCLAIMED)
> pin 40 (PIN40): (MUX UNCLAIMED) (GPIO UNCLAIMED)
> pin 41 (PIN41): (MUX UNCLAIMED) mvebu-gpio:41
> pin 42 (PIN42): (MUX UNCLAIMED) mvebu-gpio:42
> pin 43 (PIN43): (MUX UNCLAIMED) mvebu-gpio:43
> ======================================================================
>
> So you no longer know by what device the pin is claimed. It is not
> horrible of course, but I find it quite nice to be able to see which
> pin is used by what device.
>
> What do you think?
Hi Thomas
I think the first is more informative. Please use that.
Thanks
Andrew
next prev parent reply other threads:[~2013-03-26 19:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-06 16:23 [PATCH for 3.10] Misc small improvements to Kirkwood-based OpenBlocks A6 platform Thomas Petazzoni
2013-03-06 16:23 ` [PATCH 1/3] arm: kirkwood: affect pins to their devices on OpenBlocks A6 Thomas Petazzoni
2013-03-06 18:21 ` Andrew Lunn
2013-03-06 19:07 ` Thomas Petazzoni
2013-03-06 16:23 ` [PATCH 2/3] arm: kirkwood: factor pinmux descriptors for " Thomas Petazzoni
2013-03-06 18:16 ` Andrew Lunn
2013-03-06 19:16 ` Thomas Petazzoni
2013-03-07 6:22 ` Andrew Lunn
2013-03-07 8:08 ` Thomas Petazzoni
2013-03-07 9:24 ` Andrew Lunn
2013-03-22 15:44 ` Thomas Petazzoni
2013-03-26 19:48 ` Andrew Lunn [this message]
2013-03-06 16:23 ` [PATCH 3/3] arm: kirkwood: add support for Init button on " Thomas Petazzoni
2013-03-06 18:24 ` Andrew Lunn
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=20130326194829.GG631@lunn.ch \
--to=andrew@lunn.ch \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.