From: "Jiří Prchal" <jiri.prchal@aksignal.cz>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
John Crispin <blogic@openwrt.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Alexandre Courbot <acourbot@nvidia.com>,
Grant Likely <grant.likely@linaro.org>
Subject: Re: [PATCH] gpio: add export with name from dts
Date: Fri, 11 Oct 2013 13:30:37 +0200 [thread overview]
Message-ID: <5257E15D.5080602@aksignal.cz> (raw)
In-Reply-To: <CACRpkda0=wWPP1JD-pzafEsbrOh2KQmOsvei2gc6m9yBa1tDZg@mail.gmail.com>
Dne 11.10.2013 12:48, Linus Walleij napsal(a):
> This patch must be CC to devicetree@vger.kernel.org as it concerns
> device tree bindings. Please also keep Alexandre Courbot in the loop as
> he's working on GPIO refactorings.
Send them too.
>
> On Fri, Oct 11, 2013 at 12:05 PM, Jiri Prchal <jiri.prchal@aksignal.cz> wrote:
>
>> Add export possibility to sysfs with given name in device tree.
>> Rebased from older unapplyed patch: [PATCH] owrt: GPIO: add gpio_export_with_name.
>>
>> Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
>
> This is a very terse commit message for something which will have
> a very drastic impact on the Linux kernel and device tree.
It looks drastic, but it change name of function and adds one parameter to it.
And of course dt probe.
>
>> +3) gpio-export
>> +--------------
>> +
>> +gpio-export will allow you to automatically export gpio
>
>
> What does this mean? You have to define all terms. And also consider the
> audience. If someone is using device tree on Symbian or Windows,
> what does "export" mean to them? Not all readers of this document
> are Linux implementers.
Didn't know that dt is using someone else.
>
>> +required properties:
>> +- compatible: Should be "gpio-export"
>
> If this is a Linux-specific concept it should be named "linux-gpio-export"
>
> But overall I'm not happy with this *at all* as the sysfs ABI is already
> enough of a trouble for us. WIth platforms switching to DT-only
> probing it would be perfect to get rid of this sysfs interface altogether.
I'm not happy too.
>
> Two questions:
>
> - What do you think of the approach of just not using this for DT
> boots, instead we create a new userspace ABI, using e.g. a
> char device for each GPIO chip like /dev/gpio0, /dev/gpio1 etc
> and access these using ioctl:s?
It would be nice, but yesterday was late.
Even nicer would be /dev/in13, /dev/out20 etc.
>
> - I guess you have a specific system in mind for this? What is the
> use case? I have seen *way* too many people trying to reimplement
> drivers/leds/leds-gpio.c
> drivers/input/keyboard/gpio_keys.c
> drivers/input/keyboard/gpio_keys_polled.c
> drivers/power/gpio-charger.c
> drivers/i2c/busses/i2c-gpio.c
> drivers/extcon/extcon-gpio.c
> drivers/spi/spi-gpio.c
> IN USERSPACE! JUST BECAUSE THEY CAN!
As I know, no one is good for me. May be I could use gpio-led for outputs,
but they would be under sysfs/leds and it isn't clear. And what for inputs?
>
>>From a kernel developers point of view the kernel shall handle
> hardware, so that is why I'm quite picky about this.
It is hardware, my board has IN13, IN14 ... OUT19, GSM_ON etc. Why didn't
access them by right HW name.
Thanks
Jiri
next prev parent reply other threads:[~2013-10-11 11:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1381485939-12435-1-git-send-email-jiri.prchal@aksignal.cz>
2013-10-11 10:48 ` [PATCH] gpio: add export with name from dts Linus Walleij
2013-10-11 11:30 ` Jiří Prchal [this message]
2013-10-11 12:49 ` Linus Walleij
2013-10-11 13:10 ` Jiří Prchal
2013-10-11 14:46 ` Linus Walleij
2013-10-11 17:21 ` Bryan Wu
2013-10-11 11:03 Jiri Prchal
[not found] ` <1381489420-12578-1-git-send-email-jiri.prchal-cKCO0sOKHLPtwjQa/ONI9g@public.gmane.org>
2013-10-11 13:45 ` Mark Rutland
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=5257E15D.5080602@aksignal.cz \
--to=jiri.prchal@aksignal.cz \
--cc=acourbot@nvidia.com \
--cc=blogic@openwrt.org \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
/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).