* 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.
*/
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.