-
Notifications
You must be signed in to change notification settings - Fork 220
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
Support new GPIO character device interface #157
Comments
Information on when these gpiolib features were merged into the kernel: gpio: add a userspace chardev ABI for GPIOs
gpio: add userspace ABI for GPIO line information
gpio: userspace ABI for reading/writing GPIO lines
gpio: userspace ABI for reading GPIO line events
|
lsgpio utlitiy uses these new ioctl()'s to list all lines for each gpiochip:
system calls that lsgpio uses:
|
Bartosz Golaszewski created libgpiod to make it easier to use the new kernel GPIO API: The repo for libgpiod is hosted here: Examples of the libgpiod API:
bindings: python #5
|
Update on Python bindings for libgpiod by @brgl:
|
From brgl/libgpiod#5 (comment)
|
|
Hello Sir, I am a novice w/ all this info. but if you need support, I will take time out to look over things and test stuff. Seth P.S. If you want to direct me as to what is important right now versus what can wait, I can make some notes and get back to you. |
@pdp7 , Hello Sir...I have been reading and trying to catch up to what you may already know about these instances listed above. ... https://github.com/torvalds/linux/blob/master/Documentation/driver-api/gpio/drivers-on-gpio.rst. This is what I found recently in Linux. I have been watching the YouTube.com video on gpio and how we are not supposed to call it from UserSpace. I am almost done w/ the video. Seth P.S. I will continue my search on these subjects. Are you still wanting assistance for any particular subject matter? |
Hello, I still have the /sys/class/gpio (legacy) system and the new character device system for gpio at /dev. Seth P.S. I will work on it. Be back later in the year or hopefully, sooner. |
Okay and Hello, I found the userspaceio GitHub.com page. This is good motion in action. I found the fellow that did a presentation on Linux Embedded Conference, too. He has a GitHub.com page for libgpiod. Seth P.S. I was able to get my LED lit and turned off by the character device system. |
@silver2row check out libgpiod repo and bindings: python #5. There are comments in there by @sgjava |
Hello Again Sir...Look here: https://www.hackster.io/silver2row/the-new-character-device-idea-0968d6. I made a "funny" set up of making a LED blink on and after the return button has been pressed, the LED turns off when the pin is high w/ Seth P.S. I thought this was fascinating. Now, I need to read more as usual before I can get more into things. So, let me know if you need support. I am actually building a CNC for fun, just for posting, but I will have time to read more. Just show me the way and I can start on ideas. |
@silver2row thanks, that is very interesting |
@pdp7 , No issue, sir. I thought you would have liked that idea. Seth P.S. I know you may not know everything on this subject but neither do I. If I can ever catch up to what you have read already, I may be able to help. I will keep searching online for ideas and issues pertaining to character device support. So, just let me know if you have some nice docs. on this subject. |
Linux kernel gpio subsystem maintainer Linus Walleij presented GPIO descriptors in this presentation:
Linus W. details kernel-external API changes:
/sys/class/gpio
sysfs interface is marked as deprecated/sys/bus/gpiochipN
or/dev/gpiochipN
Linus W. emphasized these points:
The Rules of Linux Userspace GPIO
Features the Character Device Has
The text was updated successfully, but these errors were encountered: