looks up base address where possible
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
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.
@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.