All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [periperi] How to set default GPIO pin ?
Date: Mon, 29 Sep 2014 08:58:03 +0000	[thread overview]
Message-ID: <CACRpkdZg7_edUiAaGq_YPLyT4gCfOcZ8463rYb=hD0Xqr4gOYg@mail.gmail.com> (raw)
In-Reply-To: <2033766.6tR9OHe7ZC@avalon>

On Sun, Sep 28, 2014 at 11:25 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi Linus and Morimoto-san,
>
> On Tuesday 23 September 2014 17:06:28 Linus Walleij wrote:
>> On Wed, Sep 10, 2014 at 10:55 AM, Laurent Pinchart wrote:
>> > On Sunday 31 August 2014 22:08:52 Kuninori Morimoto wrote:
>> >> I know we can use "defalt" PFC settings on DT.
>> >> But, how to use "defalt" GPIO pin settings on DT ?
>> >>
>> >> We would like to use GPIO 7-17 as Low output,
>> >> and do nothing after boot.
>> >
>> > From a DT point of view I believe this is supposed to be done by
>> > specifying the output-low or output-high properties in the pinctrl
>> > configuration node. However, these properties are not supported by the PFC
>> > driver, and there's no easy way for the PFC driver to configure GPIOs
>> > handled by a different driver such as the gpio-rcar driver for instance.
>> >
>> > Linus, do you have any hindsight on how this should be implemented ?
>>
>> I have suggested adding GPIO hogs, so that a GPIO node can specify
>> that some GPIO's specified on the local ship be hogged high or
>> low at probe. Generic DT bindings and generic code in gpiolib.c.
>>
>> gpios-hog-high = <....>;
>> gpios-hog-low = <....>;
>
> How about just a gpios-hog property, with a list of gpio specifiers + flags ?
> That's bikeshedding I suppose.
>
> Morimoto-san, would you like to implement that ? :-)

There was a proposed implementation from Boris BREZILLON, but I was
unhappy with parts of it, however check it and see my comments on
the patch set:
"[RFC PATCH] gpio: add GPIO hogging mechanism"

Yours,
Linus Walleij

WARNING: multiple messages have this Message-ID (diff)
From: Linus Walleij <linus.walleij@linaro.org>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Boris BREZILLON <boris.brezillon@free-electrons.com>
Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>,
	"goda (Renesas)" <yusuke.goda.sx@renesas.com>,
	"linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [periperi] How to set default GPIO pin ?
Date: Mon, 29 Sep 2014 10:58:03 +0200	[thread overview]
Message-ID: <CACRpkdZg7_edUiAaGq_YPLyT4gCfOcZ8463rYb=hD0Xqr4gOYg@mail.gmail.com> (raw)
In-Reply-To: <2033766.6tR9OHe7ZC@avalon>

On Sun, Sep 28, 2014 at 11:25 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi Linus and Morimoto-san,
>
> On Tuesday 23 September 2014 17:06:28 Linus Walleij wrote:
>> On Wed, Sep 10, 2014 at 10:55 AM, Laurent Pinchart wrote:
>> > On Sunday 31 August 2014 22:08:52 Kuninori Morimoto wrote:
>> >> I know we can use "defalt" PFC settings on DT.
>> >> But, how to use "defalt" GPIO pin settings on DT ?
>> >>
>> >> We would like to use GPIO 7-17 as Low output,
>> >> and do nothing after boot.
>> >
>> > From a DT point of view I believe this is supposed to be done by
>> > specifying the output-low or output-high properties in the pinctrl
>> > configuration node. However, these properties are not supported by the PFC
>> > driver, and there's no easy way for the PFC driver to configure GPIOs
>> > handled by a different driver such as the gpio-rcar driver for instance.
>> >
>> > Linus, do you have any hindsight on how this should be implemented ?
>>
>> I have suggested adding GPIO hogs, so that a GPIO node can specify
>> that some GPIO's specified on the local ship be hogged high or
>> low at probe. Generic DT bindings and generic code in gpiolib.c.
>>
>> gpios-hog-high = <....>;
>> gpios-hog-low = <....>;
>
> How about just a gpios-hog property, with a list of gpio specifiers + flags ?
> That's bikeshedding I suppose.
>
> Morimoto-san, would you like to implement that ? :-)

There was a proposed implementation from Boris BREZILLON, but I was
unhappy with parts of it, however check it and see my comments on
the patch set:
"[RFC PATCH] gpio: add GPIO hogging mechanism"

Yours,
Linus Walleij

WARNING: multiple messages have this Message-ID (diff)
From: linus.walleij@linaro.org (Linus Walleij)
To: linux-arm-kernel@lists.infradead.org
Subject: [periperi] How to set default GPIO pin ?
Date: Mon, 29 Sep 2014 10:58:03 +0200	[thread overview]
Message-ID: <CACRpkdZg7_edUiAaGq_YPLyT4gCfOcZ8463rYb=hD0Xqr4gOYg@mail.gmail.com> (raw)
In-Reply-To: <2033766.6tR9OHe7ZC@avalon>

On Sun, Sep 28, 2014 at 11:25 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi Linus and Morimoto-san,
>
> On Tuesday 23 September 2014 17:06:28 Linus Walleij wrote:
>> On Wed, Sep 10, 2014 at 10:55 AM, Laurent Pinchart wrote:
>> > On Sunday 31 August 2014 22:08:52 Kuninori Morimoto wrote:
>> >> I know we can use "defalt" PFC settings on DT.
>> >> But, how to use "defalt" GPIO pin settings on DT ?
>> >>
>> >> We would like to use GPIO 7-17 as Low output,
>> >> and do nothing after boot.
>> >
>> > From a DT point of view I believe this is supposed to be done by
>> > specifying the output-low or output-high properties in the pinctrl
>> > configuration node. However, these properties are not supported by the PFC
>> > driver, and there's no easy way for the PFC driver to configure GPIOs
>> > handled by a different driver such as the gpio-rcar driver for instance.
>> >
>> > Linus, do you have any hindsight on how this should be implemented ?
>>
>> I have suggested adding GPIO hogs, so that a GPIO node can specify
>> that some GPIO's specified on the local ship be hogged high or
>> low at probe. Generic DT bindings and generic code in gpiolib.c.
>>
>> gpios-hog-high = <....>;
>> gpios-hog-low = <....>;
>
> How about just a gpios-hog property, with a list of gpio specifiers + flags ?
> That's bikeshedding I suppose.
>
> Morimoto-san, would you like to implement that ? :-)

There was a proposed implementation from Boris BREZILLON, but I was
unhappy with parts of it, however check it and see my comments on
the patch set:
"[RFC PATCH] gpio: add GPIO hogging mechanism"

Yours,
Linus Walleij

  parent reply	other threads:[~2014-09-29  8:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8738cc0vx9.wl%kuninori.morimoto.gx@gmail.com>
2014-09-10  8:55 ` [periperi] How to set default GPIO pin ? Laurent Pinchart
2014-09-10  8:55   ` Laurent Pinchart
2014-09-12  7:27   ` Kuninori Morimoto
2014-09-12  7:27     ` Kuninori Morimoto
2014-09-23 15:06   ` Linus Walleij
2014-09-23 15:06     ` Linus Walleij
2014-09-23 15:06     ` Linus Walleij
2014-09-28 21:25     ` Laurent Pinchart
2014-09-28 21:25       ` Laurent Pinchart
2014-09-28 21:25       ` Laurent Pinchart
2014-09-28 23:58       ` Kuninori Morimoto
2014-09-28 23:58         ` Kuninori Morimoto
2014-09-28 23:58         ` Kuninori Morimoto
2014-09-29  8:58       ` Linus Walleij [this message]
2014-09-29  8:58         ` Linus Walleij
2014-09-29  8:58         ` Linus Walleij

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='CACRpkdZg7_edUiAaGq_YPLyT4gCfOcZ8463rYb=hD0Xqr4gOYg@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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 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.