9
0
Fork 0
Commit Graph

9 Commits

Author SHA1 Message Date
Antony Pavlov bcf0877266 gpiolib: import gpio_request_array() from linux 3.7
Also import related functions gpio_request_one() and
gpio_free_array().

This commit imports code from linux 3.7 as
the more recent linux kernel versions use gpiolib descriptors,
see this commit for details:

  commit 372e722ea4dd4ca11c3d04845e11cbc15f32144c
  Author: Alexandre Courbot <acourbot@nvidia.com>
  Date:   Sun Feb 3 01:29:29 2013 +0900

      gpiolib: use descriptors internally

      Make sure gpiolib works internally with descriptors and (chip, offset)
      pairs instead of using the global integer namespace. This prepares the
      ground for the removal of the global gpio_desc[] array and the
      introduction of the descriptor-based GPIO API.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-22 10:59:04 +01:00
Antony Pavlov 6339a419e9 gpio: unify gpio direction macros names with Linux kernel
See linux.git/include/linux/gpio.h and
linux.git/Documentation/gpio.txt for details.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-22 10:59:00 +01:00
Sebastian Hesselbarth ed4348e8b2 gpiolib: add get_direction callback
At least for debugging purposes it is helpful to determine the current
direction for a given GPIO. Add a callback to gpiochip, to allow to
get it.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-11 09:02:07 +01:00
Antony Pavlov 2924294da1 gpio: fix typos
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-12 12:30:34 +02:00
Alexander Shiyan 100c016f35 Add Generic GPIO driver
This patch adds generic memory-mapped GPIO controller support.
Code taken from Linux Kernel and adopted for barebox.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-11 22:17:42 +01:00
Jean-Christophe PLAGNIOL-VILLARD 8429aed80e gpiolib: add gpio_request and gpio_free support
as today if no request or free provided do not complain

if the gpio is not request auto requested at first use

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-22 16:39:23 +01:00
Sascha Hauer 2f8fe26382 add gpiolib support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
2012-09-04 08:26:49 +02:00
Sascha Hauer 47548c90b1 gpio: add static inlines for gpio_request/gpio_free
Some drivers use gpio_request/gpio_free. Currently no architecture
has code behind these functions. Provide static inline functions
for these and remvoe the at91 specific inline functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:27:27 +02:00
Sascha Hauer baa33bd4e2 GPIO support
adopted Linux gpio code. Implemented for at91sam9. No gpiolib support
yet.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-10-27 17:29:57 +01:00