[PATCH] pinctrl: bcm2835: Make pin freeing behavior configurable

Stefan Wahren wahrenst at gmx.net
Thu May 2 04:11:06 PDT 2024


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 at 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?

Thanks
>
> Cheers,
> Kent.
>
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel




More information about the linux-arm-kernel mailing list