diff options
author | danh-arm <dan.handley@arm.com> | 2016-05-27 14:10:42 +0100 |
---|---|---|
committer | danh-arm <dan.handley@arm.com> | 2016-05-27 14:10:42 +0100 |
commit | a7e530331d7cf4b58618f0715e61b5a872176f07 (patch) | |
tree | b8f1fcb1b1a9e2ba1e18cc09f70be3046cac2bb8 /include/drivers | |
parent | aa037ca9a0b3ae52e1df5bfb4ddf273215b75877 (diff) | |
parent | 86c253e450a6506a95d4fa846945b769026cf72c (diff) |
Merge pull request #632 from rockchip-linux/support-for-gpio-driver-v2
rockchip/rk3399: Support the gpio driver and configure
Diffstat (limited to 'include/drivers')
-rw-r--r-- | include/drivers/gpio.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/drivers/gpio.h b/include/drivers/gpio.h index a5cb5c7f..633b3f6b 100644 --- a/include/drivers/gpio.h +++ b/include/drivers/gpio.h @@ -37,17 +37,25 @@ #define GPIO_LEVEL_LOW 0 #define GPIO_LEVEL_HIGH 1 +#define GPIO_PULL_NONE 0 +#define GPIO_PULL_UP 1 +#define GPIO_PULL_DOWN 2 + typedef struct gpio_ops { int (*get_direction)(int gpio); void (*set_direction)(int gpio, int direction); int (*get_value)(int gpio); void (*set_value)(int gpio, int value); + void (*set_pull)(int gpio, int pull); + int (*get_pull)(int gpio); } gpio_ops_t; int gpio_get_direction(int gpio); void gpio_set_direction(int gpio, int direction); int gpio_get_value(int gpio); void gpio_set_value(int gpio, int value); +void gpio_set_pull(int gpio, int pull); +int gpio_get_pull(int gpio); void gpio_init(const gpio_ops_t *ops); #endif /* __GPIO_H__ */ |