gpio: add flags to export GPIOs when requesting
[platform/adaptation/renesas_rcar/renesas_kernel.git] / include / linux / gpio.h
index ed5a467..af511a6 100644 (file)
 #define GPIOF_OUT_INIT_LOW     (GPIOF_DIR_OUT | GPIOF_INIT_LOW)
 #define GPIOF_OUT_INIT_HIGH    (GPIOF_DIR_OUT | GPIOF_INIT_HIGH)
 
+/* Gpio pin is open drain */
+#define GPIOF_OPEN_DRAIN       (1 << 2)
+
+/* Gpio pin is open source */
+#define GPIOF_OPEN_SOURCE      (1 << 3)
+
+#define GPIOF_EXPORT           (1 << 2)
+#define GPIOF_EXPORT_CHANGEABLE        (1 << 3)
+#define GPIOF_EXPORT_DIR_FIXED (GPIOF_EXPORT)
+#define GPIOF_EXPORT_DIR_CHANGEABLE (GPIOF_EXPORT | GPIOF_EXPORT_CHANGEABLE)
+
 /**
  * struct gpio - a structure describing a GPIO with configuration
  * @gpio:      the GPIO number