devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benoit Parrot <bparrot@ti.com>
To: Alexandre Courbot <gnurou@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Maxime Ripard <maxime.ripard@free-electrons.com>,
	Jiri Prchal <jiri.prchal@aksignal.cz>,
	Pantelis Antoniou <panto@antoniou-consulting.com>,
	Arend van Spriel <arend@broadcom.com>
Subject: Re: [Patch v5 2/2] gpio: Document GPIO hogging mechanism
Date: Tue, 13 Jan 2015 12:38:10 -0600	[thread overview]
Message-ID: <20150113183810.GG5834@ti.com> (raw)
In-Reply-To: <CAAVeFuLF7EVR-Xta=eNegmGWX9AFu9xmyhXisGCTwc1ds3t1cA@mail.gmail.com>

Alexandre Courbot <gnurou@gmail.com> wrote on Tue [2015-Jan-13 06:43:33 +0900]:
> On Tue, Jan 13, 2015 at 1:39 AM, Benoit Parrot <bparrot@ti.com> wrote:
> > Linus Walleij <linus.walleij@linaro.org> wrote on Mon [2015-Jan-12 11:20:14 +0100]:
> >> On Fri, Dec 19, 2014 at 9:07 PM, Benoit Parrot <bparrot@ti.com> wrote:
> >>
> >> > Add GPIO hogging documentation to gpio.txt
> >> >
> >> > Signed-off-by: Benoit Parrot <bparrot@ti.com>
> >> > Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
> >>
> >> This is starting to look good ...
> >>
> >> > +               line_b {
> >> > +                       gpio-hog;
> >> > +                       gpios = <6 0>;
> >> > +                       state = "output-low";
> >>
> >> I don't like the state string.
> >>
> >> Instead have boolean properties for all states.
> >>
> >> line_b {
> >>     gpio-hog;
> >>     gpios = <6 0>;
> >>     output-low;
> >>     line-name = "foo-bar-gpio";
> >> }
> >>
> >> Then use of_property_read_bool() in the code to check which
> >> state is to be selected intially. You can check that no mutually
> >> exclusive state are selected, I don't like that an arbitrary string
> >> select the state like that, if we do it that way an enumerator would
> >> be better, I prefer bools.
> >
> > I am sorry but that is how it was originally in the first patch.
> > Alexandre's review comment suggested this method in [1] and [2] (below).
> >
> > Alexandre, any comments?
> >
> > [1] http://marc.info/?l=linux-gpio&m=141456662426151&w=2
> >
> > [2] http://marc.info/?l=linux-gpio&m=141715982424744&w=2
> 
> When Linus and I are in conflict, follow Linus. Arnd's suggestion of
> having enums defined in (IIUC) include/dt-bindings/gpio and using them
> sounds good to me too and might make everyone happy (no possibility of
> conflicting definitions + no strings). Linus, could you comment on it?

Understood.
Now given Linus prefers the bools that is the direction I am going to follow.

  reply	other threads:[~2015-01-13 18:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-19 20:07 [Patch v5 0/2] gpio: add GPIO hogging mechanism Benoit Parrot
2014-12-19 20:07 ` [Patch v5 1/2] " Benoit Parrot
2015-01-12 10:16   ` Linus Walleij
2014-12-19 20:07 ` [Patch v5 2/2] gpio: Document " Benoit Parrot
2015-01-12 10:20   ` Linus Walleij
2015-01-12 10:28     ` Arend van Spriel
2015-01-12 16:39     ` Benoit Parrot
2015-01-12 21:43       ` Alexandre Courbot
2015-01-13 18:38         ` Benoit Parrot [this message]
     [not found]         ` <CAAVeFuLF7EVR-Xta=eNegmGWX9AFu9xmyhXisGCTwc1ds3t1cA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-16 10:20           ` Linus Walleij

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=20150113183810.GG5834@ti.com \
    --to=bparrot@ti.com \
    --cc=arend@broadcom.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gnurou@gmail.com \
    --cc=jiri.prchal@aksignal.cz \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.ripard@free-electrons.com \
    --cc=panto@antoniou-consulting.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).