-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gpios: Adapt to the upstream persist_gpio_outputs change #6150
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit c6ee931.
This reverts commit 2f8da7f.
commit 8ff0598 upstream. 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: raspberrypi#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>
Having accepted the upstream change to add the persist_gpio_outputs parameter, make it true by default. See: raspberrypi#6117 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Following 8ff0598, adopt the same parameter name but with the opposite default. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Following the adoption upstream of a similar parameter but with another name, update the dtparam definitions to use the new name and sense. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix
approved these changes
May 7, 2024
popcornmix
added a commit
to raspberrypi/firmware
that referenced
this pull request
May 9, 2024
See: raspberrypi/linux#6151 kernel: defconfigs: Add ILI9881 to rpi and bcm2709 defconfigs See: raspberrypi/linux#6025 kernel: configs: Enable BCACHEFS as a module See: raspberrypi/linux#6149 kernel: gpios: Adapt to the upstream persist_gpio_outputs change See: raspberrypi/linux#6150 kernel: dts: bcm2712: Drop snd_bcm2835 bootargs references from Pi5 See: raspberrypi/linux#6153 kernel: overlays: Add sc16is750-spi0
popcornmix
added a commit
to raspberrypi/rpi-firmware
that referenced
this pull request
May 9, 2024
See: raspberrypi/linux#6151 kernel: defconfigs: Add ILI9881 to rpi and bcm2709 defconfigs See: raspberrypi/linux#6025 kernel: configs: Enable BCACHEFS as a module See: raspberrypi/linux#6149 kernel: gpios: Adapt to the upstream persist_gpio_outputs change See: raspberrypi/linux#6150 kernel: dts: bcm2712: Drop snd_bcm2835 bootargs references from Pi5 See: raspberrypi/linux#6153 kernel: overlays: Add sc16is750-spi0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Commit 8ff0598 ("pinctrl: bcm2835: Make pin freeing behavior configurable") is a version of "pinctrl: bcm2835: Only return non-GPIOs to inputs" with upstream blessing. Backport and adopt that commit, making a similar change to pinctrl-rp1, with sufficient changes to preserve the existing downstream behaviour.