linux/drivers/pinctrl/bcm
Stefan Wahren 8ff05989b4 pinctrl: bcm2835: Make pin freeing behavior configurable
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.persist_gpio_outputs is set to 1, 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>
Message-ID: <20240503062745.11298-1-wahrenst@gmx.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-05-06 08:14:01 +02:00
..
Kconfig arm64: bcmbca: Make BCM4908 drivers depend on ARCH_BCMBCA 2022-08-15 09:55:34 -07:00
Makefile pinctrl: bcm: add driver for BCM4908 pinmux 2022-01-25 01:42:13 +01:00
pinctrl-bcm63xx.c pinctrl: bcm: add bcm63xx base code 2021-03-29 12:20:07 +02:00
pinctrl-bcm63xx.h pinctrl: bcm: Convert drivers to use struct pingroup and PINCTRL_PINGROUP() 2022-08-25 13:57:00 +02:00
pinctrl-bcm281xx.c pinctrl: bcm: Add missing header(s) 2022-10-24 12:53:33 +03:00
pinctrl-bcm2835.c pinctrl: bcm2835: Make pin freeing behavior configurable 2024-05-06 08:14:01 +02:00
pinctrl-bcm4908.c pinctrl: bcm: add driver for BCM4908 pinmux 2022-01-25 01:42:13 +01:00
pinctrl-bcm6318.c pinctrl: bcm: Convert drivers to use struct pingroup and PINCTRL_PINGROUP() 2022-08-25 13:57:00 +02:00
pinctrl-bcm6328.c pinctrl: bcm: Remove unused struct bcm6328_pingroup 2022-10-04 09:39:22 +02:00
pinctrl-bcm6358.c pinctrl: bcm: Convert drivers to use struct pingroup and PINCTRL_PINGROUP() 2022-08-25 13:57:00 +02:00
pinctrl-bcm6362.c pinctrl: bcm: Convert drivers to use struct pingroup and PINCTRL_PINGROUP() 2022-08-25 13:57:00 +02:00
pinctrl-bcm6368.c pinctrl: bcm: Convert drivers to use struct pingroup and PINCTRL_PINGROUP() 2022-08-25 13:57:00 +02:00
pinctrl-bcm63268.c pinctrl: bcm: Convert drivers to use struct pingroup and PINCTRL_PINGROUP() 2022-08-25 13:57:00 +02:00
pinctrl-cygnus-mux.c pinctrl: bcm: Add missing header(s) 2022-10-24 12:53:33 +03:00
pinctrl-iproc-gpio.c treewide: rename pinctrl_gpio_free_new() 2023-11-04 10:23:21 +01:00
pinctrl-ns2-mux.c pinctrl: bcm: Add missing header(s) 2022-10-24 12:53:33 +03:00
pinctrl-ns.c pinctrl: bcm: Convert to use grp member 2023-12-12 00:47:52 +01:00
pinctrl-nsp-gpio.c pinctrl: nsp-gpio: Silence probe deferral messages 2023-08-10 10:41:20 +02:00
pinctrl-nsp-mux.c pinctrl: bcm: Add missing header(s) 2022-10-24 12:53:33 +03:00