diff options
Diffstat (limited to 'arch/arm/plat-samsung/include')
-rw-r--r-- | arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h | 6 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/gpio-cfg.h | 11 |
2 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h b/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h index a8868c429f7a..3e21c75feefa 100644 --- a/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h +++ b/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h | |||
@@ -30,6 +30,12 @@ static inline int s3c_gpio_do_setcfg(struct s3c_gpio_chip *chip, | |||
30 | return (chip->config->set_config)(chip, off, config); | 30 | return (chip->config->set_config)(chip, off, config); |
31 | } | 31 | } |
32 | 32 | ||
33 | static inline unsigned s3c_gpio_do_getcfg(struct s3c_gpio_chip *chip, | ||
34 | unsigned int off) | ||
35 | { | ||
36 | return (chip->config->get_config)(chip, off); | ||
37 | } | ||
38 | |||
33 | static inline int s3c_gpio_do_setpull(struct s3c_gpio_chip *chip, | 39 | static inline int s3c_gpio_do_setpull(struct s3c_gpio_chip *chip, |
34 | unsigned int off, s3c_gpio_pull_t pull) | 40 | unsigned int off, s3c_gpio_pull_t pull) |
35 | { | 41 | { |
diff --git a/arch/arm/plat-samsung/include/plat/gpio-cfg.h b/arch/arm/plat-samsung/include/plat/gpio-cfg.h index 29cd6a86cade..8d01e853df39 100644 --- a/arch/arm/plat-samsung/include/plat/gpio-cfg.h +++ b/arch/arm/plat-samsung/include/plat/gpio-cfg.h | |||
@@ -77,6 +77,17 @@ struct s3c_gpio_cfg { | |||
77 | */ | 77 | */ |
78 | extern int s3c_gpio_cfgpin(unsigned int pin, unsigned int to); | 78 | extern int s3c_gpio_cfgpin(unsigned int pin, unsigned int to); |
79 | 79 | ||
80 | /** | ||
81 | * s3c_gpio_getcfg - Read the current function for a GPIO pin | ||
82 | * @pin: The pin to read the configuration value for. | ||
83 | * | ||
84 | * Read the configuration state of the given @pin, returning a value that | ||
85 | * could be passed back to s3c_gpio_cfgpin(). | ||
86 | * | ||
87 | * @sa s3c_gpio_cfgpin | ||
88 | */ | ||
89 | extern unsigned s3c_gpio_getcfg(unsigned int pin); | ||
90 | |||
80 | /* Define values for the pull-{up,down} available for each gpio pin. | 91 | /* Define values for the pull-{up,down} available for each gpio pin. |
81 | * | 92 | * |
82 | * These values control the state of the weak pull-{up,down} resistors | 93 | * These values control the state of the weak pull-{up,down} resistors |