summaryrefslogtreecommitdiffstats
path: root/include/gpio.h
Commit message (Collapse)AuthorAgeFilesLines
* gpio: Drop asm-generic/gpio.hSascha Hauer2015-08-201-1/+22
| | | | | | | | | | Since we no longer have custom gpio function prototypes we can drop the prototypes from asm-generic/gpio.h can add them to include/gpio.h instead. While at it add static inline dummy wrappers for !CONFIG_GENERIC_GPIO so that code using gpios can compile without gpio support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gpio: move gpio_is_valid to include/gpio.hSascha Hauer2014-11-281-0/+11
| | | | | | | | No architectue implements its own gpio_is_valid() function, so move the only existing implementation to include/gpio.h where it's available for all users. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gpiolib: import gpio_request_array() from linux 3.7Antony Pavlov2013-11-221-0/+39
| | | | | | | | | | | | | | | | | | | | | | | 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>
* gpio: unify gpio direction macros names with Linux kernelAntony Pavlov2013-11-221-2/+2
| | | | | | | | 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>
* gpiolib: add get_direction callbackSebastian Hesselbarth2013-11-111-0/+4
| | | | | | | | | 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>
* gpio: fix typosAntony Pavlov2013-05-121-1/+1
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add Generic GPIO driverAlexander Shiyan2013-03-111-0/+1
| | | | | | | | 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>
* gpiolib: add gpio_request and gpio_free supportJean-Christophe PLAGNIOL-VILLARD2012-12-221-0/+7
| | | | | | | | | 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>
* add gpiolib supportSascha Hauer2012-09-041-1/+26
| | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
* gpio: add static inlines for gpio_request/gpio_freeSascha Hauer2012-07-251-0/+13
| | | | | | | | 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>
* GPIO supportSascha Hauer2008-10-271-0/+1
adopted Linux gpio code. Implemented for at91sam9. No gpiolib support yet. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>