aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic/gpio.h
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@simtec.co.uk>2009-04-02 19:57:05 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-02 22:04:51 -0400
commit926b663ce8215ba448960e1ff6e58b67a2c3b99b (patch)
treed60e6add2528b6a61968b0dc2db2f162bb157639 /include/asm-generic/gpio.h
parentf30281f4f7c2a0efcfeddad12277dfdada8f08a7 (diff)
gpiolib: allow GPIOs to be named
Allow GPIOs in GPIOLIB chips to be named. This name is then used when the GPIO is exported to sysfs, although it could be used elsewhere if deemed useful. Signed-off-by: Daniel Silverstone <dsilvers@simtec.co.uk> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-generic/gpio.h')
-rw-r--r--include/asm-generic/gpio.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index 81797ec9ab29..d6c379dc64fa 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -55,6 +55,10 @@ struct module;
55 * handled is (base + ngpio - 1). 55 * handled is (base + ngpio - 1).
56 * @can_sleep: flag must be set iff get()/set() methods sleep, as they 56 * @can_sleep: flag must be set iff get()/set() methods sleep, as they
57 * must while accessing GPIO expander chips over I2C or SPI 57 * must while accessing GPIO expander chips over I2C or SPI
58 * @names: if set, must be an array of strings to use as alternative
59 * names for the GPIOs in this chip. Any entry in the array
60 * may be NULL if there is no alias for the GPIO, however the
61 * array must be @ngpio entries long.
58 * 62 *
59 * A gpio_chip can help platforms abstract various sources of GPIOs so 63 * A gpio_chip can help platforms abstract various sources of GPIOs so
60 * they can all be accessed through a common programing interface. 64 * they can all be accessed through a common programing interface.
@@ -92,6 +96,7 @@ struct gpio_chip {
92 struct gpio_chip *chip); 96 struct gpio_chip *chip);
93 int base; 97 int base;
94 u16 ngpio; 98 u16 ngpio;
99 char **names;
95 unsigned can_sleep:1; 100 unsigned can_sleep:1;
96 unsigned exported:1; 101 unsigned exported:1;
97}; 102};