devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Courbot <gnurou@gmail.com>
To: Benoit Parrot <bparrot@ti.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>
Subject: Re: [Patch v5 2/2] gpio: Document GPIO hogging mechanism
Date: Tue, 13 Jan 2015 06:43:33 +0900	[thread overview]
Message-ID: <CAAVeFuLF7EVR-Xta=eNegmGWX9AFu9xmyhXisGCTwc1ds3t1cA@mail.gmail.com> (raw)
In-Reply-To: <20150112163902.GE5834@ti.com>

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?

  reply	other threads:[~2015-01-12 21:43 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 [this message]
2015-01-13 18:38         ` Benoit Parrot
     [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='CAAVeFuLF7EVR-Xta=eNegmGWX9AFu9xmyhXisGCTwc1ds3t1cA@mail.gmail.com' \
    --to=gnurou@gmail.com \
    --cc=bparrot@ti.com \
    --cc=devicetree@vger.kernel.org \
    --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).