]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/asm-generic/gpio.h
update to 2015.04-rc1
[karo-tx-uboot.git] / include / asm-generic / gpio.h
index 3b96b8209a10b09d2cdcdf1f559c5fa2787831d7..d4f4f0685b96e3d872870eb77725c44d4f2d27cc 100644 (file)
  * an error value of -1.
  */
 
+enum gpio_flags {
+       GPIOFLAG_INPUT,
+       GPIOFLAG_OUTPUT_INIT_LOW,
+       GPIOFLAG_OUTPUT_INIT_HIGH,
+};
+
+struct gpio {
+       unsigned int gpio;
+       enum gpio_flags flags;
+       const char *label;
+};
+
 /**
  * @deprecated Please use driver model instead
  * Request a GPIO. This should be called before any of the other functions
  */
 int gpio_request(unsigned gpio, const char *label);
 
+/**
+ * @deprecated Please use driver model instead
+ * Request a GPIO and configure it
+ * @param gpios        pointer to array of gpio defs
+ * @param count        number of GPIOs to set up
+ */
+int gpio_request_one(unsigned gpio, enum gpio_flags flags, const char *label);
+
+/**
+ * Request a set of GPIOs and configure them
+ * @param gpios        pointer to array of gpio defs
+ * @param count        number of GPIOs to set up
+ */
+int gpio_request_array(const struct gpio *gpios, int count);
+
 /**
  * @deprecated Please use driver model instead
  * Stop using the GPIO.  This function should not alter pin configuration.
@@ -57,6 +84,14 @@ int gpio_request(unsigned gpio, const char *label);
  */
 int gpio_free(unsigned gpio);
 
+/**
+ * @deprecated Please use driver model instead
+ * Release a set of GPIOs
+ * @param gpios        pointer to array of gpio defs
+ * @param count        number of GPIOs to set up
+ */
+int gpio_free_array(const struct gpio *gpios, int count);
+
 /**
  * @deprecated Please use driver model instead
  * Make a GPIO an input.