All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benoit Parrot <bparrot@ti.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <gnurou@gmail.com>
Cc: "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>
Subject: Re: [Patch v5 2/2] gpio: Document GPIO hogging mechanism
Date: Mon, 12 Jan 2015 10:39:02 -0600	[thread overview]
Message-ID: <20150112163902.GE5834@ti.com> (raw)
In-Reply-To: <CACRpkdb7Wq7-rBypqPkefejY5Qfq_KKx91H+DxKWv-TM2y04bg@mail.gmail.com>

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

> 
> Yours,
> Linus Walleij
> --
> To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-01-12 16:42 UTC|newest]

Thread overview: 14+ 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 ` Benoit Parrot
2014-12-19 20:07 ` [Patch v5 1/2] " Benoit Parrot
2014-12-19 20:07   ` Benoit Parrot
2015-01-12 10:16   ` Linus Walleij
2014-12-19 20:07 ` [Patch v5 2/2] gpio: Document " Benoit Parrot
2014-12-19 20:07   ` Benoit Parrot
2015-01-12 10:20   ` Linus Walleij
2015-01-12 10:28     ` Arend van Spriel
2015-01-12 16:39     ` Benoit Parrot [this message]
2015-01-12 21:43       ` Alexandre Courbot
2015-01-13 18:38         ` Benoit Parrot
     [not found]         ` <CAAVeFuLF7EVR-Xta=eNegmGWX9AFu9xmyhXisGCTwc1ds3t1cA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-16 10:20           ` Linus Walleij
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=20150112163902.GE5834@ti.com \
    --to=bparrot@ti.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 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.