From: Benoit Parrot <bparrot@ti.com>
To: Pantelis Antoniou <pantelis.antoniou@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
linux-gpio@vger.kernel.org,
linux-kernel <linux-kernel@vger.kernel.org>,
devicetree@vger.kernel.org
Subject: Re: [RFC Patch] gpio: add GPIO hogging mechanism
Date: Wed, 29 Oct 2014 11:34:45 -0500 [thread overview]
Message-ID: <20141029163445.GB29965@ti.com> (raw)
In-Reply-To: <3D00ADB3-00B3-40A8-8263-444BCADDAC33@gmail.com>
Pantelis,
Thanks for the feedback.
Pantelis Antoniou <pantelis.antoniou@gmail.com> wrote on Wed [2014-Oct-29 10:53:44 +0200]:
> Hi Benoit,
>
> > On Oct 21, 2014, at 23:09 , Benoit Parrot <bparrot@ti.com> wrote:
> >
> > Based on Boris Brezillion work this is a reworked patch
> > of his initial GPIO hogging mechanism.
> > This patch provides a way to initally configure specific GPIO
> > when the gpio controller is probe.
> >
> > The actual DT scanning to collect the GPIO specific data is performed
> > as part of the gpiochip_add().
> >
> > The purpose of this is to allows specific GPIOs to be configured
> > without any driver specific code.
> > This particularly usueful because board design are getting
> > increassingly complex and given SoC pins can now have upward
> > of 10 mux values a lot of connections are now dependent on
> > external IO muxes to switch various modes and combination.
> >
> > Specific drivers should not necessarily need to be aware of
> > what accounts to a specific board implementation. This board level
> > "description" should be best kept as part of the dts file.
> >
>
> This look like it’s going to the right direction. I have a few general
> comments at first.
>
> 1) It relies on dubious DT binding of having sub-nodes of the
> gpio device implicitly defining hogs.
I think in this instance the nodes are explicitly defining hogs.
Please clarify. What would you like to see here?
>
> 2) There is no way for having hogs inserted dynamically as far as I can tell, and
> no way to remove a hog either.
The original patch was allowing that but, Linus's review comment suggested this feature be
part of the gpio-controller's gpiochip_add() hook only.
>
> 3) I’m not very fond of having this being part of the gpio controller. This
> configuration conceptually has little to do with the gpio controller per se,
> it is more of a board specific thing. Why not come up with a gpio-hog driver that
> references GPIOs? That way with a single gpio-hog driver instance you could setup
> all the GPIO-hogging configuration for all GPIOs on the board, even one that
> lie on different GPIO controllers.
Again this follows Linus's review comment.
I agree that it prevent a centralize spot where all hog would be defined but it has the advantages of not relying on PROBE_DEFER.
I mean since all "gpio-hogs" would be defined in a single board dts file it would not be that hard to figure out the big picture anyways.
>
>
> > Signed-off-by: Benoit Parrot <bparrot@ti.com>
> > ---
> > Documentation/devicetree/bindings/gpio/gpio.txt | 33 +++++++++
> > drivers/gpio/gpiolib-of.c | 99 +++++++++++++++++++++++++
> > drivers/gpio/gpiolib.c | 81 ++++++++++++++++++++
> > include/linux/of_gpio.h | 11 +++
> > 4 files changed, 224 insertions(+)
> >
>
> Regards
>
> — Pantelis
>
Regards,
Benoit
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Benoit Parrot <bparrot@ti.com>
To: Pantelis Antoniou <pantelis.antoniou@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
<linux-gpio@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
<devicetree@vger.kernel.org>
Subject: Re: [RFC Patch] gpio: add GPIO hogging mechanism
Date: Wed, 29 Oct 2014 11:34:45 -0500 [thread overview]
Message-ID: <20141029163445.GB29965@ti.com> (raw)
In-Reply-To: <3D00ADB3-00B3-40A8-8263-444BCADDAC33@gmail.com>
Pantelis,
Thanks for the feedback.
Pantelis Antoniou <pantelis.antoniou@gmail.com> wrote on Wed [2014-Oct-29 10:53:44 +0200]:
> Hi Benoit,
>
> > On Oct 21, 2014, at 23:09 , Benoit Parrot <bparrot@ti.com> wrote:
> >
> > Based on Boris Brezillion work this is a reworked patch
> > of his initial GPIO hogging mechanism.
> > This patch provides a way to initally configure specific GPIO
> > when the gpio controller is probe.
> >
> > The actual DT scanning to collect the GPIO specific data is performed
> > as part of the gpiochip_add().
> >
> > The purpose of this is to allows specific GPIOs to be configured
> > without any driver specific code.
> > This particularly usueful because board design are getting
> > increassingly complex and given SoC pins can now have upward
> > of 10 mux values a lot of connections are now dependent on
> > external IO muxes to switch various modes and combination.
> >
> > Specific drivers should not necessarily need to be aware of
> > what accounts to a specific board implementation. This board level
> > "description" should be best kept as part of the dts file.
> >
>
> This look like it’s going to the right direction. I have a few general
> comments at first.
>
> 1) It relies on dubious DT binding of having sub-nodes of the
> gpio device implicitly defining hogs.
I think in this instance the nodes are explicitly defining hogs.
Please clarify. What would you like to see here?
>
> 2) There is no way for having hogs inserted dynamically as far as I can tell, and
> no way to remove a hog either.
The original patch was allowing that but, Linus's review comment suggested this feature be
part of the gpio-controller's gpiochip_add() hook only.
>
> 3) I’m not very fond of having this being part of the gpio controller. This
> configuration conceptually has little to do with the gpio controller per se,
> it is more of a board specific thing. Why not come up with a gpio-hog driver that
> references GPIOs? That way with a single gpio-hog driver instance you could setup
> all the GPIO-hogging configuration for all GPIOs on the board, even one that
> lie on different GPIO controllers.
Again this follows Linus's review comment.
I agree that it prevent a centralize spot where all hog would be defined but it has the advantages of not relying on PROBE_DEFER.
I mean since all "gpio-hogs" would be defined in a single board dts file it would not be that hard to figure out the big picture anyways.
>
>
> > Signed-off-by: Benoit Parrot <bparrot@ti.com>
> > ---
> > Documentation/devicetree/bindings/gpio/gpio.txt | 33 +++++++++
> > drivers/gpio/gpiolib-of.c | 99 +++++++++++++++++++++++++
> > drivers/gpio/gpiolib.c | 81 ++++++++++++++++++++
> > include/linux/of_gpio.h | 11 +++
> > 4 files changed, 224 insertions(+)
> >
>
> Regards
>
> — Pantelis
>
Regards,
Benoit
next prev parent reply other threads:[~2014-10-29 16:34 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-21 20:09 [RFC Patch] gpio: add GPIO hogging mechanism Benoit Parrot
2014-10-21 20:09 ` Benoit Parrot
2014-10-29 7:09 ` Alexandre Courbot
2014-10-29 7:09 ` Alexandre Courbot
2014-10-29 16:21 ` Benoit Parrot
2014-10-29 16:21 ` Benoit Parrot
2014-10-30 0:29 ` Alexandre Courbot
2014-11-14 9:19 ` Linus Walleij
2014-11-14 10:22 ` Maxime Ripard
2014-10-29 8:53 ` Pantelis Antoniou
2014-10-29 8:53 ` Pantelis Antoniou
2014-10-29 16:34 ` Benoit Parrot [this message]
2014-10-29 16:34 ` Benoit Parrot
2014-10-29 16:42 ` Pantelis Antoniou
2014-10-29 19:36 ` Benoit Parrot
2014-10-29 19:36 ` Benoit Parrot
2014-10-30 0:31 ` Alexandre Courbot
2014-10-30 0:31 ` Alexandre Courbot
2014-11-03 9:43 ` Linus Walleij
2014-11-03 9:43 ` Linus Walleij
2014-10-29 10:45 ` Maxime Ripard
2014-10-29 16:41 ` Benoit Parrot
2014-10-29 16:41 ` Benoit Parrot
2014-10-29 16:47 ` Maxime Ripard
2014-10-29 23:09 ` Benoit Parrot
2014-10-29 23:09 ` Benoit Parrot
2014-10-30 17:16 ` Maxime Ripard
2014-11-03 9:59 ` Linus Walleij
2014-11-04 0:38 ` Benoit Parrot
[not found] ` <20141104003827.GA24005-l0cyMroinI0@public.gmane.org>
2014-11-14 9:16 ` Linus Walleij
2014-11-14 9:16 ` Linus Walleij
-- strict thread matches above, loose matches on Subject: below --
2014-10-06 11:58 [GIT PULL] bulk pin control changes for v3.18 Linus Walleij
2014-10-06 15:37 ` [RFC PATCH] gpio: add GPIO hogging mechanism Benoit Parrot
2014-10-06 15:37 ` Benoit Parrot
2014-10-21 10:55 ` Linus Walleij
2013-12-19 14:34 Boris BREZILLON
[not found] ` <1387463671-1164-1-git-send-email-b.brezillon-ZNYIgs0QAGpBDgjK7y7TUQ@public.gmane.org>
2013-12-19 14:34 ` Boris BREZILLON
2013-12-19 14:34 ` Boris BREZILLON
2013-12-19 16:41 ` Greg Kroah-Hartman
2013-12-19 16:47 ` Felipe Balbi
2013-12-19 16:47 ` Felipe Balbi
2013-12-19 17:18 ` boris brezillon
2013-12-19 18:22 ` Felipe Balbi
2013-12-19 18:22 ` Felipe Balbi
2013-12-30 9:48 ` boris brezillon
2014-01-08 9:45 ` Linus Walleij
[not found] ` <20131219164109.GB27409-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2013-12-19 17:13 ` boris brezillon
2013-12-19 17:13 ` boris brezillon
2014-09-20 21:37 ` Ben Gamari
2014-09-20 22:26 ` Ben Gamari
2014-01-08 9:37 ` Linus Walleij
2014-01-08 10:18 ` boris brezillon
2014-01-14 10:27 ` Linus Walleij
2014-10-02 15:47 ` Benoit Parrot
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=20141029163445.GB29965@ti.com \
--to=bparrot@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pantelis.antoniou@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.