Skip to content
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

looks up base address where possible #204

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

nwpray
Copy link

@nwpray nwpray commented Jun 27, 2024

on some systems the addressing is messed up because Ubuntu starts addressing GPIO higher than 0. This PR tries to look up the base address by looking for the gpiochip* directory which is postfixed with the base address. If it cant find that file it just continues to use 0

This was referenced Jun 27, 2024
@andi34
Copy link

andi34 commented Aug 4, 2024

It's not to blame Ubuntu, it's a decision of the Pi foundation. Was answered in the forums:
For years now, fixing the base GPIO number to zero has been frowned upon by the kernel devs. In the next kernels we release (6.6) there will be an error message at boot up about it. At the same time, the sysfs interface to the GPIOs has been deprecated - some distributions have already disabled it and are expecting users to go through libgpiod.
The launch of Pi 5 gave us the opportunity to nudge people to update their apps in preparation for the upcoming changes without breaking existing systems. When we launch 6.6 the older Pis will have the same, high-numbered GPIOsn - probably still available by sysfs, but eventually that will be switched off.

@andi34
Copy link

andi34 commented Sep 1, 2024

@nwpray do you know if anything changed setting GPIO as PU by default?

gpio=5,6,7,8,16,17,20,21,22,26,27=pu

Inside /firmware/boot/config.txt does not seem to work for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants