aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Balbi <felipe.balbi@nokia.com>2010-05-26 17:42:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-27 12:12:42 -0400
commit8156fae26aec0285840ffa6faff6cae017abe81b (patch)
treea7bea92b57f79dfc80ae6303566087ae31c99a0c
parent48feb337475aaf8f8603b0db8e88c6fe3e194ab6 (diff)
arm: omap: remove the unused omap_gpio_set_debounce methods
Nobody uses that anymore, so remove and expect drivers to use the gpiolib implementation. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Cc: Tony Lindgren <tony@atomide.com> Cc: David Brownell <david-b@pacbell.net> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/arm/plat-omap/gpio.c74
1 files changed, 0 insertions, 74 deletions
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 1a65865fcfb6..393e9219a5b6 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -677,80 +677,6 @@ static void _set_gpio_debounce(struct gpio_bank *bank, unsigned gpio,
677 __raw_writel(val, reg); 677 __raw_writel(val, reg);
678} 678}
679 679
680void omap_set_gpio_debounce(int gpio, int enable)
681{
682 struct gpio_bank *bank;
683 void __iomem *reg;
684 unsigned long flags;
685 u32 val, l = 1 << get_gpio_index(gpio);
686
687 if (cpu_class_is_omap1())
688 return;
689
690 bank = get_gpio_bank(gpio);
691 reg = bank->base;
692
693 if (cpu_is_omap44xx())
694 reg += OMAP4_GPIO_DEBOUNCENABLE;
695 else
696 reg += OMAP24XX_GPIO_DEBOUNCE_EN;
697
698 if (!(bank->mod_usage & l)) {
699 printk(KERN_ERR "GPIO %d not requested\n", gpio);
700 return;
701 }
702
703 spin_lock_irqsave(&bank->lock, flags);
704 val = __raw_readl(reg);
705
706 if (enable && !(val & l))
707 val |= l;
708 else if (!enable && (val & l))
709 val &= ~l;
710 else
711 goto done;
712
713 if (cpu_is_omap34xx() || cpu_is_omap44xx()) {
714 bank->dbck_enable_mask = val;
715 if (enable)
716 clk_enable(bank->dbck);
717 else
718 clk_disable(bank->dbck);
719 }
720
721 __raw_writel(val, reg);
722done:
723 spin_unlock_irqrestore(&bank->lock, flags);
724}
725EXPORT_SYMBOL(omap_set_gpio_debounce);
726
727void omap_set_gpio_debounce_time(int gpio, int enc_time)
728{
729 struct gpio_bank *bank;
730 void __iomem *reg;
731
732 if (cpu_class_is_omap1())
733 return;
734
735 bank = get_gpio_bank(gpio);
736 reg = bank->base;
737
738 if (!bank->mod_usage) {
739 printk(KERN_ERR "GPIO not requested\n");
740 return;
741 }
742
743 enc_time &= 0xff;
744
745 if (cpu_is_omap44xx())
746 reg += OMAP4_GPIO_DEBOUNCINGTIME;
747 else
748 reg += OMAP24XX_GPIO_DEBOUNCE_VAL;
749
750 __raw_writel(enc_time, reg);
751}
752EXPORT_SYMBOL(omap_set_gpio_debounce_time);
753
754#ifdef CONFIG_ARCH_OMAP2PLUS 680#ifdef CONFIG_ARCH_OMAP2PLUS
755static inline void set_24xx_gpio_triggering(struct gpio_bank *bank, int gpio, 681static inline void set_24xx_gpio_triggering(struct gpio_bank *bank, int gpio,
756 int trigger) 682 int trigger)