From: swarren@wwwdotorg.org (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv2 3/7] pinctrl: gpio: vt8500: Add pincontrol driver for arch-vt8500
Date: Wed, 27 Mar 2013 09:53:26 -0600 [thread overview]
Message-ID: <515315F6.5040401@wwwdotorg.org> (raw)
In-Reply-To: <1364376206.2160.10.camel@gitbox>
On 03/27/2013 03:23 AM, Tony Prisk wrote:
> On Tue, 2013-03-26 at 14:28 -0600, Stephen Warren wrote:
>> On 03/25/2013 12:51 PM, Tony Prisk wrote:
...
>>> - #gpio-cells : should be <3>.
>>> 1) bank
>>> 2) pin number
>>> 3) flags - should be 0
>>>
>>> I will clarify this in the next version.
>>
>> I think you should define a flag for inverted or active-low. This is
>> typically bit 0 in the flags cell.
>> ...
>
> Stephen,
>
> Do you know if there is an example of this somewhere I can look at?
>
> I did a quick search through the documentation for pinctrl and gpio, but
> I can't find any code for defining active-low in the gpio flags. There
> seems to be plenty for defining interrupt 'modes' but nothing for
> setting active-low.
Interrupt modes would be for the IRQ binding, not the GPIO binding.
For an example, see:
Documentation/devicetree/bindings/gpio/
> grep -i polarity *
> gpio-74x164.txt: the second cell is used to specify the gpio polarity:
> gpio-adnp.txt: - bit 0: polarity (0: normal, 1: inverted)
> gpio_lpc32xx.txt: - bit 0 specifies polarity (0 for normal, 1 for inverted)
> gpio-mxs.txt: the second cell is used to specify the gpio polarity:
> nvidia,tegra20-gpio.txt: - bit 0 specifies polarity (0 for normal, 1 for inverted)
> pl061-gpio.txt: - bit 0 specifies polarity (0 for normal, 1 for inverted)
> I also couldn't see anywhere where it was possible to interpret the
> flags that are passed in. Assuming I add an .of_xlate, and pass, for
> example, *flags = gpiospec[2] I can't see anywhere later on where I get
> the chance to 'decode' the flags to perform the specific configurations.
of_get_named_gpio_flags() will return the flags.
For an example usage, see:
> drivers/mmc/core/host.c:369: gpio = of_get_named_gpio_flags(np, "cd-gpios", 0, &flags);
(it's at that line in next-20130325 at least)
next prev parent reply other threads:[~2013-03-27 15:53 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-23 5:13 [PATCHv2 0/7] arm: vt8500: Add support for pinctrl/gpio module Tony Prisk
2013-03-23 5:13 ` [PATCHv2 1/7] of: Add support for reading a u32 from a multi-value property Tony Prisk
2013-03-23 5:13 ` Tony Prisk
2013-04-15 10:12 ` Grant Likely
2013-04-15 10:12 ` Grant Likely
2013-03-23 5:13 ` [PATCHv2 2/7] arm: vt8500: Increase available GPIOs on arch-vt8500 Tony Prisk
2013-03-23 10:44 ` Russell King - ARM Linux
2013-03-23 18:04 ` Tony Prisk
2013-03-23 5:13 ` [PATCHv2 3/7] pinctrl: gpio: vt8500: Add pincontrol driver for arch-vt8500 Tony Prisk
2013-03-25 17:05 ` Stephen Warren
2013-03-25 18:51 ` Tony Prisk
2013-03-26 20:28 ` Stephen Warren
2013-03-27 4:59 ` Tony Prisk
2013-03-27 16:47 ` Stephen Warren
2013-03-27 9:23 ` Tony Prisk
2013-03-27 15:53 ` Stephen Warren [this message]
2013-03-28 5:03 ` Tony Prisk
2013-03-23 5:13 ` [PATCHv2 4/7] arm: dts: vt8500: Update Wondermedia SoC dtsi files for pinctrl driver Tony Prisk
2013-03-23 5:13 ` [PATCHv2 5/7] arm: vt8500: Remove gpio devicetree nodes Tony Prisk
2013-03-23 5:13 ` [PATCHv2 6/7] gpio: vt8500: Remove arch-vt8500 gpio driver Tony Prisk
2013-03-23 5:13 ` [PATCHv2 7/7] arm: vt8500: Remove pinmux configuration from mach-vt8500/vt8500.c Tony Prisk
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=515315F6.5040401@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--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.