]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-generic/gpio.h
gpiolib request/free hooks
[linux-2.6-omap-h63xx.git] / include / asm-generic / gpio.h
index e71e1e82e68a2ea2d4390c55ae393807ae69ef7c..48cc5d97addfc817c8074bc84496d8dc3a00b995 100644 (file)
@@ -35,6 +35,10 @@ struct module;
  * @label: for diagnostics
  * @dev: optional device providing the GPIOs
  * @owner: helps prevent removal of modules exporting active GPIOs
+ * @request: optional hook for chip-specific activation, such as
+ *     enabling module power and clock; may sleep
+ * @free: optional hook for chip-specific deactivation, such as
+ *     disabling module power and clock; may sleep
  * @direction_input: configures signal "offset" as input, or returns error
  * @get: returns value for signal "offset"; for output signals this
  *     returns either the value actually sensed, or zero
@@ -67,6 +71,11 @@ struct gpio_chip {
        struct device           *dev;
        struct module           *owner;
 
+       int                     (*request)(struct gpio_chip *chip,
+                                               unsigned offset);
+       void                    (*free)(struct gpio_chip *chip,
+                                               unsigned offset);
+
        int                     (*direction_input)(struct gpio_chip *chip,
                                                unsigned offset);
        int                     (*get)(struct gpio_chip *chip,