From: Albert H. <he...@us...> - 2009-03-02 18:34:04
|
Update of /cvsroot/gc-linux/linux/include/asm-generic In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv503/include/asm-generic Modified Files: gpio.h Log Message: [PATCH] gpiolib: add gpio_direction_is_output From: Albert Herranz <alb...@ya...> Date: Sun, 1 Mar 2009 19:10:07 +0100 Subject: [PATCH] gpiolib: add gpio_direction_is_output Add a function to determine if a given gpio has been already configured as an output. This is handy for drivers that require changing multiple times the direction of a gpio and want to easily avoid redundant direction changes. Signed-off-by: Albert Herranz <alb...@ya...> Index: gpio.h =================================================================== RCS file: /cvsroot/gc-linux/linux/include/asm-generic/gpio.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gpio.h 2 Mar 2009 18:33:09 -0000 1.1 --- gpio.h 2 Mar 2009 18:33:59 -0000 1.2 *************** *** 114,117 **** --- 114,118 ---- extern int gpio_direction_input(unsigned gpio); extern int gpio_direction_output(unsigned gpio, int value); + extern int gpio_direction_is_output(unsigned gpio); extern int gpio_get_value_cansleep(unsigned gpio); |