Linux-GPIO Archive mirror
 help / color / mirror / Atom feed
From: Stefan Wahren <wahrenst@gmx.net>
To: Kent Gibson <warthog618@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Florian Fainelli <florian.fainelli@broadcom.com>,
	bcm-kernel-feedback-list@broadcom.com,
	Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Phil Elwell <phil@raspberrypi.com>
Subject: Re: [PATCH] pinctrl: bcm2835: Make pin freeing behavior configurable
Date: Thu, 2 May 2024 14:20:57 +0200	[thread overview]
Message-ID: <328dad0c-bb84-49ff-89c9-f1bce5c4b33b@gmx.net> (raw)
In-Reply-To: <20240502111546.GA325017@rigel>

Am 02.05.24 um 13:15 schrieb Kent Gibson:
> On Thu, May 02, 2024 at 01:11:06PM +0200, Stefan Wahren wrote:
>> Hi Kent,
>>
>> Am 02.05.24 um 13:04 schrieb Kent Gibson:
>>> On Thu, May 02, 2024 at 12:22:07PM +0200, Stefan Wahren wrote:
>>>> Am 19.04.24 um 22:40 schrieb Stefan Wahren:
>>>>> Until now after a bcm2835 pin was freed its pinmux was set to GPIO_IN.
>>>>> So in case it was configured as GPIO_OUT before the configured output
>>>>> level also get lost. As long as GPIO sysfs was used this wasn't
>>>>> actually a problem because the pins and their possible output level
>>>>> were kept by sysfs.
>>>>>
>>>>> Since more and more Raspberry Pi users start using libgpiod they are
>>>>> confused about this behavior. So make the pin freeing behavior of
>>>>> GPIO_OUT configurable via module parameter. In case
>>>>> pinctrl-bcm2835.strict_gpiod is set to 0, the output level is kept.
>>>>>
>>>>> This patch based on the downstream work of Phil Elwell.
>>>>>
>>>>> Link: https://github.com/raspberrypi/linux/pull/6117
>>>>> Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
>>>>> ---
>>>>>     drivers/pinctrl/bcm/pinctrl-bcm2835.c | 20 ++++++++++++++++----
>>>>>     1 file changed, 16 insertions(+), 4 deletions(-)
>>>> Gentle ping ...
>>> I can't comment on the substance of the change as pinctrl is outside my
>>> wheelhouse, but the "strict_gpiod" name could be better.
>>> The point is to make GPIO outputs persist, right?
>> Yes, correct.
>>> The name should better reflect that.
>> Finding good and short names is hard, do you have a suggestion?
>>
> How about "persist_gpio_outputs"?
I'm fine with that. I'll wait until tomorrow before sending a new version.
>
> Cheers,
> Kent.


      reply	other threads:[~2024-05-02 12:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-19 20:40 [PATCH] pinctrl: bcm2835: Make pin freeing behavior configurable Stefan Wahren
2024-05-02 10:22 ` Stefan Wahren
2024-05-02 11:04   ` Kent Gibson
2024-05-02 11:11     ` Stefan Wahren
2024-05-02 11:15       ` Kent Gibson
2024-05-02 12:20         ` Stefan Wahren [this message]

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=328dad0c-bb84-49ff-89c9-f1bce5c4b33b@gmx.net \
    --to=wahrenst@gmx.net \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=brgl@bgdev.pl \
    --cc=florian.fainelli@broadcom.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=phil@raspberrypi.com \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    --cc=warthog618@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 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 read-only IMAP folder(s) and NNTP newsgroup(s).