* Re: [RFC PATCH] gpio: add GPIO hogging mechanism [not found] ` <52B32A70.1080700@overkiz.com> @ 2013-12-19 18:22 ` Felipe Balbi 2013-12-30 9:48 ` boris brezillon 0 siblings, 1 reply; 3+ messages in thread From: Felipe Balbi @ 2013-12-19 18:22 UTC (permalink / raw) To: boris brezillon Cc: balbi, Greg Kroah-Hartman, Rob Landley, Linus Walleij, Alexandre Courbot, Jiri Prchal, Ben Gamari, Mark Rutland, linux-doc, linux-kernel, linux-gpio, devicetree, Pekon Gupta, Linux OMAP Mailing List [-- Attachment #1: Type: text/plain, Size: 1478 bytes --] On Thu, Dec 19, 2013 at 06:18:40PM +0100, boris brezillon wrote: > Hello Felipe, > > On 19/12/2013 17:47, Felipe Balbi wrote: > >On Thu, Dec 19, 2013 at 08:41:09AM -0800, Greg Kroah-Hartman wrote: > >>On Thu, Dec 19, 2013 at 03:34:31PM +0100, Boris BREZILLON wrote: > >>>GPIO hogging is a way to request and configure specific GPIO without > >>>explicitly requesting it in the device driver. > >>> > >>>The request and configuration procedure is handled in the core device > >>>driver code before the driver probe function is called. > >>> > >>>It allows specific GPIOs to be configured without any driver specific code. > >>> > >>>Particularly usefull when a external device is connected to a bus and the > >>>bus connections depends on an external switch controlled by a GPIO pin. > >for external switches, you probably need a pinctrl-gpio driver. > > > Do you mean using pinctrl pinconf to configure the PIN as output-high or > output-low ? > > This was my first proposal > (see https://www.mail-archive.com/devicetree@vger.kernel.org/msg05829.html). that's quite a weird argument from Linus W, considering you _do_ have a discrete mux on the board. We have quite a few of such "crazy" scenarios here at TI and we were going to send a pinctrl-gpio driver. If that's not acceptable, then I suppose there is no way to boot from NAND on a board where NAND signals go through a discrete mux where the select signal is a GPIO pin. -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC PATCH] gpio: add GPIO hogging mechanism 2013-12-19 18:22 ` [RFC PATCH] gpio: add GPIO hogging mechanism Felipe Balbi @ 2013-12-30 9:48 ` boris brezillon 2014-01-08 9:45 ` Linus Walleij 0 siblings, 1 reply; 3+ messages in thread From: boris brezillon @ 2013-12-30 9:48 UTC (permalink / raw) To: balbi Cc: Greg Kroah-Hartman, Rob Landley, Linus Walleij, Alexandre Courbot, Jiri Prchal, Ben Gamari, Mark Rutland, linux-doc, linux-kernel, linux-gpio, devicetree, Pekon Gupta, Linux OMAP Mailing List Hello, On 19/12/2013 19:22, Felipe Balbi wrote: > On Thu, Dec 19, 2013 at 06:18:40PM +0100, boris brezillon wrote: >> Hello Felipe, >> >> On 19/12/2013 17:47, Felipe Balbi wrote: >>> On Thu, Dec 19, 2013 at 08:41:09AM -0800, Greg Kroah-Hartman wrote: >>>> On Thu, Dec 19, 2013 at 03:34:31PM +0100, Boris BREZILLON wrote: >>>>> GPIO hogging is a way to request and configure specific GPIO without >>>>> explicitly requesting it in the device driver. >>>>> >>>>> The request and configuration procedure is handled in the core device >>>>> driver code before the driver probe function is called. >>>>> >>>>> It allows specific GPIOs to be configured without any driver specific code. >>>>> >>>>> Particularly usefull when a external device is connected to a bus and the >>>>> bus connections depends on an external switch controlled by a GPIO pin. >>> for external switches, you probably need a pinctrl-gpio driver. >> Do you mean using pinctrl pinconf to configure the PIN as output-high or >> output-low ? >> >> This was my first proposal >> (see https://www.mail-archive.com/devicetree@vger.kernel.org/msg05829.html). My mistake: this is not exactly what I proposed in my patch series. Actually, I was directly requesting the pin connected to the external switch as OUTPUT + (OUTPUT-LEVEL) according the the device needs: - output high for MMC slot - output low for SPI device And, I guess this is why Linus asked me to find a better solution. IMHO your approach is, by far, much better. You expose the external switch as a PIN muxing device and the devices connected to through this PIN mux block just have to request the appropriate PIN states. In my specific case this would give the following: - MMC conf for mmc slot 0 - SPI conf for the SPI device With your approach the HW representation is better: the different signals controlled by the external switch can be seen using debugfs, and device tree definition is closer to the real HW design. > that's quite a weird argument from Linus W, considering you _do_ have a > discrete mux on the board. > We have quite a few of such "crazy" scenarios here at TI and we were > going to send a pinctrl-gpio driver. If that's not acceptable, then I > suppose there is no way to boot from NAND on a board where NAND signals > go through a discrete mux where the select signal is a GPIO pin. > Please keep going with the submission process: I'm really interested in this driver (BTW could you add me in the CC list ?). Linus, tell me if I'm wrong, but I think, the pinctrl-gpio is the right way to solve the at91rm9200ek board use case. This does not mean, the gpio hogs approach does not solve other issues (see https://lkml.org/lkml/2013/8/29/333 and https://www.mail-archive.com/linux-gpio@vger.kernel.org/msg01084.html), but in my specific case, I'd rather use the pinctrl-gpio driver. Best Regards, Boris ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC PATCH] gpio: add GPIO hogging mechanism 2013-12-30 9:48 ` boris brezillon @ 2014-01-08 9:45 ` Linus Walleij 0 siblings, 0 replies; 3+ messages in thread From: Linus Walleij @ 2014-01-08 9:45 UTC (permalink / raw) To: boris brezillon Cc: Felipe Balbi, Greg Kroah-Hartman, Rob Landley, Alexandre Courbot, Jiri Prchal, Ben Gamari, Mark Rutland, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, Pekon Gupta, Linux OMAP Mailing List On Mon, Dec 30, 2013 at 10:48 AM, boris brezillon <b.brezillon@overkiz.com> wrote: > On 19/12/2013 19:22, Felipe Balbi wrote: >> that's quite a weird argument from Linus W, considering you _do_ have a >> discrete mux on the board. > >> We have quite a few of such "crazy" scenarios here at TI and we were >> going to send a pinctrl-gpio driver. Hm I'm all in the blue as to what a "pinctrl-gpio driver" is ... I'm confused :-) >> If that's not acceptable, then I >> suppose there is no way to boot from NAND on a board where NAND signals >> go through a discrete mux where the select signal is a GPIO pin. One problem I have is that I still don't really understand if this is a pin mux, i.e. changing the connection to a certain device onto some actual *PIN* or just some other mux muxing some certain line from one silicon block to another. > Linus, tell me if I'm wrong, but I think, the pinctrl-gpio is the right way > to solve > the at91rm9200ek board use case. I don't know, because I don't know exactly what you mean by "pinctrl-gpio". Yours, Linus Walleij ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-08 9:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1387463671-1164-1-git-send-email-b.brezillon@overkiz.com>
[not found] ` <1387463671-1164-2-git-send-email-b.brezillon@overkiz.com>
[not found] ` <20131219164109.GB27409@kroah.com>
[not found] ` <20131219164737.GA4536@saruman.home>
[not found] ` <52B32A70.1080700@overkiz.com>
2013-12-19 18:22 ` [RFC PATCH] gpio: add GPIO hogging mechanism Felipe Balbi
2013-12-30 9:48 ` boris brezillon
2014-01-08 9:45 ` Linus Walleij
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).