devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rodolfo Giometti <giometti@enneenne.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Rob Herring <robh+dt@kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>
Subject: Re: [RFC] GPIO User I/O
Date: Tue, 7 Jul 2020 11:56:57 +0200	[thread overview]
Message-ID: <d30e64c9-ad7f-7cd5-51a4-3f37d6f1e3d8@enneenne.com> (raw)
In-Reply-To: <CAMuHMdUght0hkJT1N8ub5xR5GB+U18MAhAg+zDmAAuxoRSRaYg@mail.gmail.com>

On 07/07/2020 09:41, Geert Uytterhoeven wrote:
> Hi Rodolfo,
> 
> CC devicetree
> 
> On Tue, Jul 7, 2020 at 9:17 AM Rodolfo Giometti <giometti@enneenne.com> wrote:
>> On 06/07/2020 23:00, Geert Uytterhoeven wrote:
>>> On Mon, Jul 6, 2020 at 10:38 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>>>> On Mon, Jul 6, 2020 at 5:33 PM Rodolfo Giometti <giometti@enneenne.com> wrote:
>>>>>> With Geert's GPIO aggregator userspace and device tree can conjure
>>>>>> special per-usecase gpio chips as pointed out by Drew: this is
>>>>>> very useful when you want some kernel-managed yet
>>>>>> usecase-specific GPIO lines in a special "container" chip.
>>>>>> To me this is the best of two worlds. (Kernelspace and userspace.)
>>>>>
>>>>> Maybe this is the "best of two worlds" as you say but the problem is that board
>>>>> manufactures need a way to well-define how a GPIO line must be used for within
>>>>> the device-tree and without the need of patches! In this point of view neither
>>>>> the "driver_override" way nor adding a compatible value to
>>>>> gpio_aggregator_dt_ids[] can help (this last solution requires a patch for each
>>>>> board!). That's why at the moment they prefer not specify these GPIO lines at
>>>>> all or (improperly) use the gpio-leds and gpio-uinput interfaces to keep it
>>>>> simple...
>>>>
>>>> I think the idea is to add a very generic DT compatible to the
>>>> gpio_aggregator_dt_ids[]. That way, any DT can use the aggregator
>>>> to create a new chip with named lines etc.
>>>>
>>>> But Geert can speak of that.
>>>
>>> The idea is to describe the real device in DT, and add it's compatible value
>>> to gpio_aggregator_dt_ids[], or enable support for it dynamically using
>>> driver_override.
>>> The former indeed requires modifying the driver.
>>
>> I see.
>>
>>> Note that if you ever want to write a pure kernelspace driver, you do need
>>> a proper compatible value anyway.
>>
>> OK, but for our purposes we need just one compatible value.
>>
>>> I do agree that it's annoying to have "gpio-leds", but not "gpio-motors"
>>> or "gpio-relays".  However, you can always propose bindings for the
>>> latter, and, when they have been accepted, add those compatible
>>> values to upstream gpio_aggregator_dt_ids[].
>>
>> Having gpio-uio with proper names within it as motor0, motor1, relay0, etc. as
>> in my solution would be suffice. However, after these discussions, are there any
>> chances my patch (with needed modifications and documentation) may be accepted? :)
>>
>> Thanks for your time and answers.
> 
> Let's ask the DT people...

I think I need an OK from GPIO SUBSYSTEM's maintainers first...

Ciao,

Rodolfo

-- 
GNU/Linux Solutions                  e-mail: giometti@enneenne.com
Linux Device Driver                          giometti@linux.it
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti

  reply	other threads:[~2020-07-07 10:04 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <01afcac0-bd34-3fd0-b991-a8b40d4b4561@enneenne.com>
     [not found] ` <CACRpkdbX9T9EuN-nxkMPC=sN74PEdoLuWurNLdGCzZJwwFrdpQ@mail.gmail.com>
     [not found]   ` <1c4f1a83-835a-9317-3647-b55f6f39c0ba@enneenne.com>
     [not found]     ` <CACRpkdZPjJSryJc+RtYjRN=X7xKMcao5pYek1fUM2+sE9xgdFQ@mail.gmail.com>
     [not found]       ` <CAMuHMdUtguuu4FWU4nRS=pBUyEwKM1JZ8DYPdCQHXBYN0i_Frg@mail.gmail.com>
     [not found]         ` <87efe96c-3679-14d5-4d79-569b6c047b00@enneenne.com>
2020-07-07  7:41           ` [RFC] GPIO User I/O Geert Uytterhoeven
2020-07-07  9:56             ` Rodolfo Giometti [this message]
2020-07-09 14:11               ` [RFC] GPIO lines [was: GPIO User I/O] Rodolfo Giometti
2020-07-11 15:21                 ` Linus Walleij
2020-07-13 14:20                   ` Rodolfo Giometti
2020-07-13 21:26                     ` Linus Walleij
2020-07-14 14:01                       ` [RFC v2 " Rodolfo Giometti
2020-07-16 13:38                         ` Linus Walleij
2020-07-16 15:15                           ` Rodolfo Giometti
2020-07-19 18:35                             ` Andy Shevchenko
2020-07-20  7:38                               ` Rodolfo Giometti
2020-07-20  8:17                               ` Linus Walleij
2021-04-26  8:44                                 ` Rodolfo Giometti
2021-04-26  8:48                                   ` Andy Shevchenko
2021-04-26  9:16                                     ` Rodolfo Giometti
2021-04-26  9:31                                   ` Linus Walleij
2021-04-26  9:43                                     ` Rodolfo Giometti
2021-04-26 10:12                                       ` Linus Walleij
2021-04-26 11:20                                         ` Rodolfo Giometti

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=d30e64c9-ad7f-7cd5-51a4-3f37d6f1e3d8@enneenne.com \
    --to=giometti@enneenne.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=robh+dt@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).