linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anton Vorontsov <anton.vorontsov@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Feng Kan <fkan@apm.com>, Mark Rutland <mark.rutland@arm.com>,
	"patches@apm.com" <patches@apm.com>,
	"gnurou@gmail.com" <gnurou@gmail.com>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH V5 2/3] Documentation: gpio: Add APM X-Gene SoC GPIO controller DTS binding
Date: Mon, 7 Jul 2014 14:54:47 -0700	[thread overview]
Message-ID: <20140707215446.GA28692@teo> (raw)
In-Reply-To: <CACRpkdbt+sj_Htjrj4+hm6KHJfONpTSQyz25Hepkx5kugaO3AA@mail.gmail.com>

On Mon, Jul 07, 2014 at 11:26:18PM +0200, Linus Walleij wrote:
...
> > There was another reason for this as well, part of the gpio code I read
> > was confusing me. So I look through the other gpio documentations and
> > found an example that did this as well.
> >
> > int of_gpio_simple_xlate(struct gpio_chip *gc,
> >                          const struct of_phandle_args *gpiospec, u32 *flags)
> > {
> >         /*
> >          * We're discouraging gpio_cells < 2, since that way you'll have to
> >          * write your own xlate function (that will have to retrive the GPIO
> >          * number and the flags from a single gpio cell -- this is possible,
> >          * but not recommended).
> >          */
> 
> Hm yeah that's right.
> 
> This check was added by Anton in 2008. Anton why did we discourage
> onecell GPIOs?

Yup, the check was there from the very beginning. Think of
OF_GPIO_ACTIVE_LOW flag (it is widely used in drivers.)

The documentation in Feng's driver says "second cell is used to specify
optional parameters (unused)," which is not entirely correct. With the
standard xlate call it is used for active-low flag. You can implement
active-low flag w/o using the second cell, but it will be ugly.

Thanks,

Anton

  reply	other threads:[~2014-07-07 21:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-26 22:59 [PATCH V5 0/3] gpio: Add APM X-Gene SoC platform GPIO driver Feng Kan
2014-06-26 22:59 ` [PATCH V5 1/3] gpio: Add APM X-Gene SoC GPIO controller support Feng Kan
2014-07-04 21:20   ` Linus Walleij
2014-07-04 21:22     ` Linus Walleij
2014-06-26 22:59 ` [PATCH V5 2/3] Documentation: gpio: Add APM X-Gene SoC GPIO controller DTS binding Feng Kan
2014-06-30 12:53   ` Mark Rutland
2014-07-04 21:28     ` Linus Walleij
2014-07-07 18:52       ` Feng Kan
2014-07-07 21:26         ` Linus Walleij
2014-07-07 21:54           ` Anton Vorontsov [this message]
2014-07-08 22:54     ` Feng Kan
2014-06-26 22:59 ` [PATCH V5 3/3] arm64:dts: Add APM X-Gene SoC GPIO controller DTS entries Feng Kan
2014-06-28  3:14 ` [PATCH V5 0/3] gpio: Add APM X-Gene SoC platform GPIO driver Alexandre Courbot

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=20140707215446.GA28692@teo \
    --to=anton.vorontsov@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=fkan@apm.com \
    --cc=gnurou@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=patches@apm.com \
    /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).