Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: vr41xx: Delete vr41xx_gpio_pullupdown() callback

This API is not used anywhere in the kernel and has remained
unused for years after being introduced.

Over time, we have developed a subsystem to deal with pin
control and this now managed pull up/down.

Delete the old and unused API. If this platform needs it,
we should implement a proper pin controller for it instead.

Cc: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Paul Burton <paul.burton@mips.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

-46
-8
arch/mips/include/asm/vr41xx/giu.h
··· 51 51 52 52 extern void vr41xx_set_irq_level(unsigned int pin, irq_level_t level); 53 53 54 - typedef enum { 55 - GPIO_PULL_DOWN, 56 - GPIO_PULL_UP, 57 - GPIO_PULL_DISABLE, 58 - } gpio_pull_t; 59 - 60 - extern int vr41xx_gpio_pullupdown(unsigned int pin, gpio_pull_t pull); 61 - 62 54 #endif /* __NEC_VR41XX_GIU_H */
-38
drivers/gpio/gpio-vr41xx.c
··· 371 371 return 0; 372 372 } 373 373 374 - int vr41xx_gpio_pullupdown(unsigned int pin, gpio_pull_t pull) 375 - { 376 - u16 reg, mask; 377 - unsigned long flags; 378 - 379 - if ((giu_flags & GPIO_HAS_PULLUPDOWN_IO) != GPIO_HAS_PULLUPDOWN_IO) 380 - return -EPERM; 381 - 382 - if (pin >= 15) 383 - return -EINVAL; 384 - 385 - mask = 1 << pin; 386 - 387 - spin_lock_irqsave(&giu_lock, flags); 388 - 389 - if (pull == GPIO_PULL_UP || pull == GPIO_PULL_DOWN) { 390 - reg = giu_read(GIUTERMUPDN); 391 - if (pull == GPIO_PULL_UP) 392 - reg |= mask; 393 - else 394 - reg &= ~mask; 395 - giu_write(GIUTERMUPDN, reg); 396 - 397 - reg = giu_read(GIUUSEUPDN); 398 - reg |= mask; 399 - giu_write(GIUUSEUPDN, reg); 400 - } else { 401 - reg = giu_read(GIUUSEUPDN); 402 - reg &= ~mask; 403 - giu_write(GIUUSEUPDN, reg); 404 - } 405 - 406 - spin_unlock_irqrestore(&giu_lock, flags); 407 - 408 - return 0; 409 - } 410 - EXPORT_SYMBOL_GPL(vr41xx_gpio_pullupdown); 411 - 412 374 static int vr41xx_gpio_get(struct gpio_chip *chip, unsigned pin) 413 375 { 414 376 u16 reg, mask;