projects/linux·commit 0fc6bc0d

MIPS: RB532: Export rb532_gpio_set_func()

0fc6bc0d · Phil Sutter <[email protected]> · 2009-01-22 19:32:43 +01:00

This kernel symbol provides a way for drivers to switch on alternate
function for a certain GPIO pin. Turning it off is done implicitly when
changing the GPIO direction, as that would be fixed when using the given
pin als alternate function.

Signed-off-by: Phil Sutter <[email protected]>
Signed-off-by: Ralf Baechle <[email protected]>
Commit
0fc6bc0d6e953f6dd80c286c889d8d581e8f8d7a
Parents
3828ee04

Changes

2 files changed · +4 −2

FileStatusAddDelContent
arch/mips/include/asm/mach-rc32434/gpio.hmodified+1−0View file
arch/mips/rb532/gpio.cmodified+3−2View file

arch/mips/include/asm/mach-rc32434/gpio.h

View file
diff --git a/arch/mips/include/asm/mach-rc32434/gpio.h b/arch/mips/include/asm/mach-rc32434/gpio.h
index ca92c81..3cb50d1 100644
--- a/arch/mips/include/asm/mach-rc32434/gpio.h
+++ b/arch/mips/include/asm/mach-rc32434/gpio.h
@@ -82,5 +82,6 @@ struct rb532_gpio_reg {
extern void rb532_gpio_set_ilevel(int bit, unsigned gpio);
extern void rb532_gpio_set_istat(int bit, unsigned gpio);
+extern void rb532_gpio_set_func(unsigned gpio);
#endif /* _RC32434_GPIO_H_ */

arch/mips/rb532/gpio.c

View file
diff --git a/arch/mips/rb532/gpio.c b/arch/mips/rb532/gpio.c
index f338681..37de05d 100644
--- a/arch/mips/rb532/gpio.c
+++ b/arch/mips/rb532/gpio.c
@@ -174,10 +174,11 @@ EXPORT_SYMBOL(rb532_gpio_set_istat);
/*
* Configure GPIO alternate function
*/
-static void rb532_gpio_set_func(int bit, unsigned gpio)
+void rb532_gpio_set_func(unsigned gpio)
{
- rb532_set_bit(bit, gpio, rb532_gpio_chip->regbase + GPIOFUNC);
+ rb532_set_bit(1, gpio, rb532_gpio_chip->regbase + GPIOFUNC);
}
+EXPORT_SYMBOL(rb532_gpio_set_func);
int __init rb532_gpio_init(void)
{