Skip to content

Commit

Permalink
gpio: add interface for changing gpio mode
Browse files Browse the repository at this point in the history
Add interface for gpio driver to change gpio mode

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
  • Loading branch information
hackpascal committed Jan 17, 2024
1 parent 82f1b5c commit 12d46b0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/drivers/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#define GPIO_PULL_REPEATER ARM_TF_GPIO_PULL_REPEATER

typedef struct gpio_ops {
int (*get_mode)(int gpio);
void (*set_mode)(int gpio, int mode);
int (*get_direction)(int gpio);
void (*set_direction)(int gpio, int direction);
int (*get_value)(int gpio);
Expand Down

0 comments on commit 12d46b0

Please sign in to comment.