-
Notifications
You must be signed in to change notification settings - Fork 137
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
Add optional libgpiod support to linuxgpio #1299
Commits on Mar 16, 2023
-
linuxgpio: rename all internal functions and variables to include "sy…
…sfs" This commit renames the internal functions and variables of the linuxgpio pin driver to include "sysfs", to indicate that they're referring to the older sysfs interface. The following commits will add libgpiod support to the linuxgpio pin driver, and autoselect between them.
Configuration menu - View commit details
-
Copy full SHA for 0ff4192 - Browse repository at this point
Copy the full SHA 0ff4192View commit details -
Configuration menu - View commit details
-
Copy full SHA for a7bf91c - Browse repository at this point
Copy the full SHA a7bf91cView commit details -
linuxgpio: add optional libgpiod support
The "linuxgpio" backend will now try both the old sysfs and new (since Linux 4.8) libgpiod interface to access gpio pins. If libgpiod works it will use that, if it does not work it will fall back to the old sysfs interface. The libgpiod code is compiled in if libgpiod is available at build time, and compiled out otherwise.
Configuration menu - View commit details
-
Copy full SHA for cffd3c9 - Browse repository at this point
Copy the full SHA cffd3c9View commit details -
gpiod: find gpio lines by port ("gpiochipN") and offset (pin number)
Before this commit, linuxgpio-gpiod used `gpiod_line_find()` to find gpio lines by name, and would construct the gpio name by appending the requested gpio number to the string "GPIO". This had the advantage that it didn't have to specify the gpiochip to use, since gpio names are globally unique in gpiod-land. But it has the severe drawback that only gpios whose name begins with "GPIO" could be used. This commit changes that to use `gpiod_line_get()` instead, which takes a gpiochip name (the avrdude "port") and an "offset" (the pin number on that chip). This lets it use any available gpio line, no matter what name libgpiod assigned it.
Configuration menu - View commit details
-
Copy full SHA for 3b93ecc - Browse repository at this point
Copy the full SHA 3b93eccView commit details -
add a new conntype for linuxgpio
This also adds a default linuxgpio port ("gpiochip0"), and adds a programmer to the avrdude.conf file using linuxgpio from the Raspberry Pi GPIO port.
Configuration menu - View commit details
-
Copy full SHA for 5abbefe - Browse repository at this point
Copy the full SHA 5abbefeView commit details -
avrdude.conf: move raspberry_pi_gpio reset, add prog_modes, reformat
This makes the raspberry_pi_gpio programmer work on older Pis with the smaller 26-pin GPIO header. Updates based on code review by Hans (MCUdude).
Configuration menu - View commit details
-
Copy full SHA for bfb7955 - Browse repository at this point
Copy the full SHA bfb7955View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2663fb4 - Browse repository at this point
Copy the full SHA 2663fb4View commit details