diff options
author | Wolfgang Denk <wd@denx.de> | 2010-04-08 00:06:31 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-04-08 00:06:31 +0200 |
commit | 6a1f7e54c2dd8888dbc118e8de372dec29a0a9c5 (patch) | |
tree | df5b6d67be790d75e60f8fcd97360fc1f179ab0d /include/asm-arm/arch-s5pc1xx/gpio.h | |
parent | d8bc0a2889700ba063598de6d4e7d135360b537e (diff) | |
parent | b5045cdda556c73e2697cd1d3ea6563315cbf490 (diff) | |
download | u-boot-imx-6a1f7e54c2dd8888dbc118e8de372dec29a0a9c5.zip u-boot-imx-6a1f7e54c2dd8888dbc118e8de372dec29a0a9c5.tar.gz u-boot-imx-6a1f7e54c2dd8888dbc118e8de372dec29a0a9c5.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'include/asm-arm/arch-s5pc1xx/gpio.h')
-rw-r--r-- | include/asm-arm/arch-s5pc1xx/gpio.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/asm-arm/arch-s5pc1xx/gpio.h b/include/asm-arm/arch-s5pc1xx/gpio.h index afbc7ea..8e4bb86 100644 --- a/include/asm-arm/arch-s5pc1xx/gpio.h +++ b/include/asm-arm/arch-s5pc1xx/gpio.h @@ -124,6 +124,35 @@ struct s5pc110_gpio { struct s5pc1xx_gpio_bank gpio_h2; struct s5pc1xx_gpio_bank gpio_h3; }; + +/* functions */ +void gpio_cfg_pin(struct s5pc1xx_gpio_bank *bank, int gpio, int cfg); +void gpio_direction_output(struct s5pc1xx_gpio_bank *bank, int gpio, int en); +void gpio_direction_input(struct s5pc1xx_gpio_bank *bank, int gpio); +void gpio_set_value(struct s5pc1xx_gpio_bank *bank, int gpio, int en); +unsigned int gpio_get_value(struct s5pc1xx_gpio_bank *bank, int gpio); +void gpio_set_pull(struct s5pc1xx_gpio_bank *bank, int gpio, int mode); +void gpio_set_drv(struct s5pc1xx_gpio_bank *bank, int gpio, int mode); +void gpio_set_rate(struct s5pc1xx_gpio_bank *bank, int gpio, int mode); #endif +/* Pin configurations */ +#define GPIO_INPUT 0x0 +#define GPIO_OUTPUT 0x1 +#define GPIO_IRQ 0xf +#define GPIO_FUNC(x) (x) + +/* Pull mode */ +#define GPIO_PULL_NONE 0x0 +#define GPIO_PULL_DOWN 0x1 +#define GPIO_PULL_UP 0x2 + +/* Drive Strength level */ +#define GPIO_DRV_1X 0x0 +#define GPIO_DRV_2X 0x1 +#define GPIO_DRV_3X 0x2 +#define GPIO_DRV_4X 0x3 +#define GPIO_DRV_FAST 0x0 +#define GPIO_DRV_SLOW 0x1 + #endif |