From: Alexandre Courbot <gnurou@gmail.com>
To: Jiri Prchal <jiri.prchal@aksignal.cz>
Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
panto@antoniou-consulting.com
Subject: Re: [PATCH] gpio: add gpio_of_helper
Date: Wed, 22 Oct 2014 18:18:50 +0900 [thread overview]
Message-ID: <CAAVeFuJrmea6yZn2J28ihs3+=FYkZ2QxDv6F7qiq+TPpv_odpw@mail.gmail.com> (raw)
In-Reply-To: <4b0bcf4679163c0da53e412a47eecd4bb03849b8.1413966148.git.jiri.prchal@aksignal.cz>
On Wed, Oct 22, 2014 at 5:26 PM, Jiri Prchal <jiri.prchal@aksignal.cz> wrote:
> This patch adds new driver "gpio-of-helper", witch has possibility to export
> gpios defined in dt. It exports them in defined name under
> /sysfs/class/gpio/name.
> It's rebased from Pantelis Antoniou patch to new kernel.
> Usage example:
> gpio {
> compatible = "gpio-of-helper";
> status = "okay";
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_gpio>;
>
> gsm_on {
> gpio-name = "gsm_on";
> gpio = <&pioB 13 GPIO_ACTIVE_HIGH>;
> output;
> init-low;
> };
> };
>
> This patch needs Alexey Ignatov [PATCH] gpiolib: allow exporting gpios with
> custom names.
We will need to see whether the pre-requisite patch can get merged
first, but there are a couple of things that are wrong with your patch
anyway:
- it is missing a bindings documentation
- it is using the legacy integer GPIOs instead of the descriptor
interface (see include/linux/gpio/consumer.h). Since this is DT-based,
there is absolutely no reason to not use the descriptors interface.
- it seems quite long for what it needs to do
- the MODULE_AUTHOR has not signed-off this patch (?)
But what makes me nervous is that this encourages more usage of the
sysfs interface, an in a way that is potentially harmful.
Also, I don't know if the DT people will be happy with this idea.
Since this concerns DT, please also add the devicetree list and get a
Acked-by for the bindings you want to push by a DT maintainer.
next prev parent reply other threads:[~2014-10-22 9:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-22 8:26 [PATCH] gpio: add gpio_of_helper Jiri Prchal
2014-10-22 9:18 ` Alexandre Courbot [this message]
2014-10-22 9:24 ` Pantelis Antoniou
2014-10-22 9:41 ` Alexandre Courbot
2014-10-22 9:58 ` Pantelis Antoniou
2014-10-22 11:05 ` Jiří Prchal
2014-10-23 5:08 ` Alexandre Courbot
2014-10-23 6:23 ` Jiří Prchal
2014-10-23 8:53 ` Alexandre Courbot
2014-10-23 9:38 ` Jiří Prchal
2014-10-23 11:23 ` Pantelis Antoniou
2014-10-24 6:23 ` Alexandre Courbot
2014-10-24 7:31 ` Jiří Prchal
2014-10-28 17:25 ` Linus Walleij
2014-10-28 17:09 ` Linus Walleij
2014-10-28 17:28 ` Pantelis Antoniou
2014-10-29 7:55 ` Jiří Prchal
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='CAAVeFuJrmea6yZn2J28ihs3+=FYkZ2QxDv6F7qiq+TPpv_odpw@mail.gmail.com' \
--to=gnurou@gmail.com \
--cc=jiri.prchal@aksignal.cz \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--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).