adafruit / adafruit/adafruit-beaglebone-io-python
Support new GPIO character device interface
- Dominant language
- C
- Stars
- 479
- Forks
- 214
- PR merge metrics
- No merged PRs in 30d
Description
Linux kernel gpio subsystem maintainer Linus Walleij presented GPIO descriptors in this presentation:
* Video: [GPIO for Engineers and Makers](https://www.youtube.com/watch?v=lQRCDl0tFiQ)
* Slides: [GPIO for Engineers and Makers](http://elinux.org/images/9/9b/GPIO_for_Engineers_and_Makers.pdf)
Linus W. details kernel-external API changes:
- `/sys/class/gpio` sysfs interface is marked as deprecated
- new character device `/sys/bus/gpiochipN` or `/dev/gpiochipN`
Linus W. emphasized these points:
#### The Rules of Linux Userspace GPIO
1. You do not access GPIOs from userspace
2. YOU DO NOT ACCESS GPIOS FROM USERSPACE
3. Read Documentation/gpio/drivers-on-gpio.txt
4. Use the character device
#### Features the Character Device Has
* Discovery mechanism (not magic numbers)
* Cleanup of resources on closing or crashing
* Open Drain / Open Source
* Get and set multiple lines at once
* Good examples: tools/gpio/*Features the Character Device Has
* Discovery mechanism (not magic numbers)
* Cleanup of resources on closing or crashing
* Open Drain / Open Source
* Get and set multiple lines at once
* Good examples: tools/gpio/*
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.