aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-samsung.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/gpio-samsung.c')
-rw-r--r--drivers/gpio/gpio-samsung.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c
index f4814a889a5b..8af4b06e80f7 100644
--- a/drivers/gpio/gpio-samsung.c
+++ b/drivers/gpio/gpio-samsung.c
@@ -3194,46 +3194,6 @@ samsung_gpio_pull_t s3c_gpio_getpull(unsigned int pin)
3194} 3194}
3195EXPORT_SYMBOL(s3c_gpio_getpull); 3195EXPORT_SYMBOL(s3c_gpio_getpull);
3196 3196
3197/* gpiolib wrappers until these are totally eliminated */
3198
3199void s3c2410_gpio_pullup(unsigned int pin, unsigned int to)
3200{
3201 int ret;
3202
3203 WARN_ON(to); /* should be none of these left */
3204
3205 if (!to) {
3206 /* if pull is enabled, try first with up, and if that
3207 * fails, try using down */
3208
3209 ret = s3c_gpio_setpull(pin, S3C_GPIO_PULL_UP);
3210 if (ret)
3211 s3c_gpio_setpull(pin, S3C_GPIO_PULL_DOWN);
3212 } else {
3213 s3c_gpio_setpull(pin, S3C_GPIO_PULL_NONE);
3214 }
3215}
3216EXPORT_SYMBOL(s3c2410_gpio_pullup);
3217
3218void s3c2410_gpio_setpin(unsigned int pin, unsigned int to)
3219{
3220 /* do this via gpiolib until all users removed */
3221
3222 gpio_request(pin, "temporary");
3223 gpio_set_value(pin, to);
3224 gpio_free(pin);
3225}
3226EXPORT_SYMBOL(s3c2410_gpio_setpin);
3227
3228unsigned int s3c2410_gpio_getpin(unsigned int pin)
3229{
3230 struct samsung_gpio_chip *chip = samsung_gpiolib_getchip(pin);
3231 unsigned long offs = pin - chip->chip.base;
3232
3233 return __raw_readl(chip->base + 0x04) & (1 << offs);
3234}
3235EXPORT_SYMBOL(s3c2410_gpio_getpin);
3236
3237#ifdef CONFIG_S5P_GPIO_DRVSTR 3197#ifdef CONFIG_S5P_GPIO_DRVSTR
3238s5p_gpio_drvstr_t s5p_gpio_get_drvstr(unsigned int pin) 3198s5p_gpio_drvstr_t s5p_gpio_get_drvstr(unsigned int pin)
3239{ 3199{