diff options
Diffstat (limited to 'arch/arm/plat-samsung/include/plat/gpio-cfg.h')
-rw-r--r-- | arch/arm/plat-samsung/include/plat/gpio-cfg.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/arch/arm/plat-samsung/include/plat/gpio-cfg.h b/arch/arm/plat-samsung/include/plat/gpio-cfg.h index 29cd6a86cad..34efdd2b032 100644 --- a/arch/arm/plat-samsung/include/plat/gpio-cfg.h +++ b/arch/arm/plat-samsung/include/plat/gpio-cfg.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #define __PLAT_GPIO_CFG_H __FILE__ | 25 | #define __PLAT_GPIO_CFG_H __FILE__ |
26 | 26 | ||
27 | typedef unsigned int __bitwise__ s3c_gpio_pull_t; | 27 | typedef unsigned int __bitwise__ s3c_gpio_pull_t; |
28 | typedef unsigned int __bitwise__ s5p_gpio_drvstr_t; | ||
28 | 29 | ||
29 | /* forward declaration if gpio-core.h hasn't been included */ | 30 | /* forward declaration if gpio-core.h hasn't been included */ |
30 | struct s3c_gpio_chip; | 31 | struct s3c_gpio_chip; |
@@ -77,6 +78,17 @@ struct s3c_gpio_cfg { | |||
77 | */ | 78 | */ |
78 | extern int s3c_gpio_cfgpin(unsigned int pin, unsigned int to); | 79 | extern int s3c_gpio_cfgpin(unsigned int pin, unsigned int to); |
79 | 80 | ||
81 | /** | ||
82 | * s3c_gpio_getcfg - Read the current function for a GPIO pin | ||
83 | * @pin: The pin to read the configuration value for. | ||
84 | * | ||
85 | * Read the configuration state of the given @pin, returning a value that | ||
86 | * could be passed back to s3c_gpio_cfgpin(). | ||
87 | * | ||
88 | * @sa s3c_gpio_cfgpin | ||
89 | */ | ||
90 | extern unsigned s3c_gpio_getcfg(unsigned int pin); | ||
91 | |||
80 | /* Define values for the pull-{up,down} available for each gpio pin. | 92 | /* Define values for the pull-{up,down} available for each gpio pin. |
81 | * | 93 | * |
82 | * These values control the state of the weak pull-{up,down} resistors | 94 | * These values control the state of the weak pull-{up,down} resistors |
@@ -107,4 +119,33 @@ extern int s3c_gpio_setpull(unsigned int pin, s3c_gpio_pull_t pull); | |||
107 | */ | 119 | */ |
108 | extern s3c_gpio_pull_t s3c_gpio_getpull(unsigned int pin); | 120 | extern s3c_gpio_pull_t s3c_gpio_getpull(unsigned int pin); |
109 | 121 | ||
122 | /* Define values for the drvstr available for each gpio pin. | ||
123 | * | ||
124 | * These values control the value of the output signal driver strength, | ||
125 | * configurable on most pins on the S5C series. | ||
126 | */ | ||
127 | #define S5P_GPIO_DRVSTR_LV1 ((__force s5p_gpio_drvstr_t)0x00) | ||
128 | #define S5P_GPIO_DRVSTR_LV2 ((__force s5p_gpio_drvstr_t)0x01) | ||
129 | #define S5P_GPIO_DRVSTR_LV3 ((__force s5p_gpio_drvstr_t)0x10) | ||
130 | #define S5P_GPIO_DRVSTR_LV4 ((__force s5p_gpio_drvstr_t)0x11) | ||
131 | |||
132 | /** | ||
133 | * s5c_gpio_get_drvstr() - get the driver streght value of a gpio pin | ||
134 | * @pin: The pin number to get the settings for | ||
135 | * | ||
136 | * Read the driver streght value for the specified pin. | ||
137 | */ | ||
138 | extern s5p_gpio_drvstr_t s5p_gpio_get_drvstr(unsigned int pin); | ||
139 | |||
140 | /** | ||
141 | * s3c_gpio_set_drvstr() - set the driver streght value of a gpio pin | ||
142 | * @pin: The pin number to configure the driver streght value | ||
143 | * @drvstr: The new value of the driver strength | ||
144 | * | ||
145 | * This function sets the driver strength value for the specified pin. | ||
146 | * It will return 0 if successfull, or a negative error code if the pin | ||
147 | * cannot support the requested setting. | ||
148 | */ | ||
149 | extern int s5p_gpio_set_drvstr(unsigned int pin, s5p_gpio_drvstr_t drvstr); | ||
150 | |||
110 | #endif /* __PLAT_GPIO_CFG_H */ | 151 | #endif /* __PLAT_GPIO_CFG_H */ |