From: Arend van Spriel <arend@broadcom.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Benoit Parrot <bparrot@ti.com>,
"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>,
Alexandre Courbot <gnurou@gmail.com>,
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 11:28:00 +0100 [thread overview]
Message-ID: <54B3A1B0.1010005@broadcom.com> (raw)
In-Reply-To: <CACRpkdb7Wq7-rBypqPkefejY5Qfq_KKx91H+DxKWv-TM2y04bg@mail.gmail.com>
On 01/12/15 11:20, Linus Walleij wrote:
> 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.
To avoid the mutual exclusive state checking, would it not be more
straightforward to use numeric enum values defined in boot/dts/include.
Regards,
Arend
> Yours,
> Linus Walleij
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2015-01-12 10:28 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 [this message]
2015-01-12 16:39 ` Benoit Parrot
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
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=54B3A1B0.1010005@broadcom.com \
--to=arend@broadcom.com \
--cc=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 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).