|
@@ -40,6 +40,8 @@ struct module;
|
|
* returns either the value actually sensed, or zero
|
|
* returns either the value actually sensed, or zero
|
|
* @direction_output: configures signal "offset" as output, or returns error
|
|
* @direction_output: configures signal "offset" as output, or returns error
|
|
* @set: assigns output value for signal "offset"
|
|
* @set: assigns output value for signal "offset"
|
|
|
|
+ * @to_irq: optional hook supporting non-static gpio_to_irq() mappings;
|
|
|
|
+ * implementation may not sleep
|
|
* @dbg_show: optional routine to show contents in debugfs; default code
|
|
* @dbg_show: optional routine to show contents in debugfs; default code
|
|
* will be used when this is omitted, but custom code can show extra
|
|
* will be used when this is omitted, but custom code can show extra
|
|
* state (such as pullup/pulldown configuration).
|
|
* state (such as pullup/pulldown configuration).
|
|
@@ -73,6 +75,10 @@ struct gpio_chip {
|
|
unsigned offset, int value);
|
|
unsigned offset, int value);
|
|
void (*set)(struct gpio_chip *chip,
|
|
void (*set)(struct gpio_chip *chip,
|
|
unsigned offset, int value);
|
|
unsigned offset, int value);
|
|
|
|
+
|
|
|
|
+ int (*to_irq)(struct gpio_chip *chip,
|
|
|
|
+ unsigned offset);
|
|
|
|
+
|
|
void (*dbg_show)(struct seq_file *s,
|
|
void (*dbg_show)(struct seq_file *s,
|
|
struct gpio_chip *chip);
|
|
struct gpio_chip *chip);
|
|
int base;
|
|
int base;
|
|
@@ -112,6 +118,7 @@ extern void __gpio_set_value(unsigned gpio, int value);
|
|
|
|
|
|
extern int __gpio_cansleep(unsigned gpio);
|
|
extern int __gpio_cansleep(unsigned gpio);
|
|
|
|
|
|
|
|
+extern int __gpio_to_irq(unsigned gpio);
|
|
|
|
|
|
#ifdef CONFIG_GPIO_SYSFS
|
|
#ifdef CONFIG_GPIO_SYSFS
|
|
|
|
|