diff mbox series

[3/3] gpio: vr41xx: Delete vr41xx_gpio_pullupdown() callback

Message ID 20180912113204.1064-3-linus.walleij@linaro.org
State Accepted
Commit 2ab4a93980e4831ec901d040f792f72f84205c16
Headers show
Series [1/3] gpio: vr41xx: Include the right header | expand

Commit Message

Linus Walleij Sept. 12, 2018, 11:32 a.m. UTC
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>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

---
 arch/mips/include/asm/vr41xx/giu.h |  8 -------
 drivers/gpio/gpio-vr41xx.c         | 38 ------------------------------
 2 files changed, 46 deletions(-)

-- 
2.17.1

Comments

Paul Burton Sept. 14, 2018, 7:58 p.m. UTC | #1
Hi Linus,

On Wed, Sep 12, 2018 at 01:32:04PM +0200, Linus Walleij wrote:
> 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>

> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

> ---

>  arch/mips/include/asm/vr41xx/giu.h |  8 -------

>  drivers/gpio/gpio-vr41xx.c         | 38 ------------------------------

>  2 files changed, 46 deletions(-)


I presume you'll take this through the GPIO tree?

    Acked-by: Paul Burton <paul.burton@mips.com>


Thanks,
    Paul
Linus Walleij Sept. 17, 2018, 5:56 p.m. UTC | #2
On Fri, Sep 14, 2018 at 12:58 PM Paul Burton <paul.burton@mips.com> wrote:

> I presume you'll take this through the GPIO tree?

>

>     Acked-by: Paul Burton <paul.burton@mips.com>


Yep I queued it, thanks!

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/arch/mips/include/asm/vr41xx/giu.h b/arch/mips/include/asm/vr41xx/giu.h
index 6a90bc1d916b..ecda4cf300de 100644
--- a/arch/mips/include/asm/vr41xx/giu.h
+++ b/arch/mips/include/asm/vr41xx/giu.h
@@ -51,12 +51,4 @@  typedef enum {
 
 extern void vr41xx_set_irq_level(unsigned int pin, irq_level_t level);
 
-typedef enum {
-	GPIO_PULL_DOWN,
-	GPIO_PULL_UP,
-	GPIO_PULL_DISABLE,
-} gpio_pull_t;
-
-extern int vr41xx_gpio_pullupdown(unsigned int pin, gpio_pull_t pull);
-
 #endif /* __NEC_VR41XX_GIU_H */
diff --git a/drivers/gpio/gpio-vr41xx.c b/drivers/gpio/gpio-vr41xx.c
index 7d40104b8586..b13a49c89cc1 100644
--- a/drivers/gpio/gpio-vr41xx.c
+++ b/drivers/gpio/gpio-vr41xx.c
@@ -371,44 +371,6 @@  static int giu_set_direction(struct gpio_chip *chip, unsigned pin, int dir)
 	return 0;
 }
 
-int vr41xx_gpio_pullupdown(unsigned int pin, gpio_pull_t pull)
-{
-	u16 reg, mask;
-	unsigned long flags;
-
-	if ((giu_flags & GPIO_HAS_PULLUPDOWN_IO) != GPIO_HAS_PULLUPDOWN_IO)
-		return -EPERM;
-
-	if (pin >= 15)
-		return -EINVAL;
-
-	mask = 1 << pin;
-
-	spin_lock_irqsave(&giu_lock, flags);
-
-	if (pull == GPIO_PULL_UP || pull == GPIO_PULL_DOWN) {
-		reg = giu_read(GIUTERMUPDN);
-		if (pull == GPIO_PULL_UP)
-			reg |= mask;
-		else
-			reg &= ~mask;
-		giu_write(GIUTERMUPDN, reg);
-
-		reg = giu_read(GIUUSEUPDN);
-		reg |= mask;
-		giu_write(GIUUSEUPDN, reg);
-	} else {
-		reg = giu_read(GIUUSEUPDN);
-		reg &= ~mask;
-		giu_write(GIUUSEUPDN, reg);
-	}
-
-	spin_unlock_irqrestore(&giu_lock, flags);
-
-	return 0;
-}
-EXPORT_SYMBOL_GPL(vr41xx_gpio_pullupdown);
-
 static int vr41xx_gpio_get(struct gpio_chip *chip, unsigned pin)
 {
 	u16 reg, mask;