Skip to content

Commit

Permalink
gpiolib: export descriptor-based GPIO interface
Browse files Browse the repository at this point in the history
This patch exports the gpiod_* family of API functions, a safer
alternative to the legacy GPIO interface. Differences between the gpiod
and legacy gpio APIs are:

- gpio works with integers, whereas gpiod operates on opaque handlers
  which cannot be forged or used before proper acquisition
- gpiod get/set functions are aware of the active low state of a GPIO
- gpio consumers should now include <linux/gpio/consumer.h> to access
  the new interface, whereas chips drivers will use
  <linux/gpio/driver.h>

The legacy gpio API is now built as inline functions on top of gpiod.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Alexandre Courbot authored and Linus Walleij committed Oct 19, 2013
1 parent b41fb43 commit 79a9bec
Show file tree
Hide file tree
Showing 5 changed files with 658 additions and 362 deletions.
Loading

0 comments on commit 79a9bec

Please sign in to comment.