Skip to content

Support new GPIO character device interface #157

Open
@pdp7

Description

@pdp7

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
  • 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/*

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions