diff options
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/gpio.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index 2c5744b66dec..04cb1d175df1 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h | |||
@@ -40,6 +40,8 @@ struct module; | |||
40 | * returns either the value actually sensed, or zero | 40 | * returns either the value actually sensed, or zero |
41 | * @direction_output: configures signal "offset" as output, or returns error | 41 | * @direction_output: configures signal "offset" as output, or returns error |
42 | * @set: assigns output value for signal "offset" | 42 | * @set: assigns output value for signal "offset" |
43 | * @to_irq: optional hook supporting non-static gpio_to_irq() mappings; | ||
44 | * implementation may not sleep | ||
43 | * @dbg_show: optional routine to show contents in debugfs; default code | 45 | * @dbg_show: optional routine to show contents in debugfs; default code |
44 | * will be used when this is omitted, but custom code can show extra | 46 | * will be used when this is omitted, but custom code can show extra |
45 | * state (such as pullup/pulldown configuration). | 47 | * state (such as pullup/pulldown configuration). |
@@ -73,6 +75,10 @@ struct gpio_chip { | |||
73 | unsigned offset, int value); | 75 | unsigned offset, int value); |
74 | void (*set)(struct gpio_chip *chip, | 76 | void (*set)(struct gpio_chip *chip, |
75 | unsigned offset, int value); | 77 | unsigned offset, int value); |
78 | |||
79 | int (*to_irq)(struct gpio_chip *chip, | ||
80 | unsigned offset); | ||
81 | |||
76 | void (*dbg_show)(struct seq_file *s, | 82 | void (*dbg_show)(struct seq_file *s, |
77 | struct gpio_chip *chip); | 83 | struct gpio_chip *chip); |
78 | int base; | 84 | int base; |
@@ -112,6 +118,7 @@ extern void __gpio_set_value(unsigned gpio, int value); | |||
112 | 118 | ||
113 | extern int __gpio_cansleep(unsigned gpio); | 119 | extern int __gpio_cansleep(unsigned gpio); |
114 | 120 | ||
121 | extern int __gpio_to_irq(unsigned gpio); | ||
115 | 122 | ||
116 | #ifdef CONFIG_GPIO_SYSFS | 123 | #ifdef CONFIG_GPIO_SYSFS |
117 | 124 | ||