From 53e7cac35db5941f42221314c33693e71ffa496b Mon Sep 17 00:00:00 2001 From: Alexandre Courbot Date: Sat, 16 Nov 2013 21:44:52 +0900 Subject: gpiolib: use dedicated flags for GPIO properties GPIO mapping properties were defined using the GPIOF_* flags, which are declared in linux/gpio.h. This file is not included when using the GPIO descriptor interface. This patch declares the flags that can be used as GPIO mappings properties in linux/gpio/driver.h, and uses them in gpiolib, so that no deprecated declarations are used by the GPIO descriptor interface. This patch also allows GPIO_OPEN_DRAIN and GPIO_OPEN_SOURCE to be specified as GPIO mapping properties. Signed-off-by: Alexandre Courbot Signed-off-by: Linus Walleij --- include/linux/gpio/driver.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index 656a27efb2c8..82eac610ce1a 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -125,6 +125,13 @@ extern struct gpio_chip *gpiochip_find(void *data, int gpiod_lock_as_irq(struct gpio_desc *desc); void gpiod_unlock_as_irq(struct gpio_desc *desc); +enum gpio_lookup_flags { + GPIO_ACTIVE_HIGH = (0 << 0), + GPIO_ACTIVE_LOW = (1 << 0), + GPIO_OPEN_DRAIN = (1 << 1), + GPIO_OPEN_SOURCE = (1 << 2), +}; + /** * Lookup table for associating GPIOs to specific devices and functions using * platform data. @@ -152,9 +159,9 @@ struct gpiod_lookup { */ unsigned int idx; /* - * mask of GPIOF_* values + * mask of GPIO_* values */ - unsigned long flags; + enum gpio_lookup_flags flags; }; /* -- cgit v1.2.3-59-g8ed1b