gpiolib: add gpio get direction callback support
authorMathias Nyman <mathias.nyman@linux.intel.com>
Wed, 24 Oct 2012 14:25:27 +0000 (17:25 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 26 Oct 2012 07:18:55 +0000 (09:18 +0200)
commit80b0a6029272247f19146bf8f88e5d4bba94cba5
tree40cb6244bd1efb5e8e351952cf15e36d06801491
parentd6a2fa0424aefe97289aa561444ec3ae09bdbba0
gpiolib: add gpio get direction callback support

Add .get_direction callback to gpio_chip. This allows gpiolib
to check the current direction of a gpio.
Used to show the correct gpio direction in sysfs and debug entries.

If callback is not set then gpiolib will work as previously;
e.g. guessing everything is input until a direction is set.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c
include/asm-generic/gpio.h