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

MIPS: RB532: Export rb532_gpio_set_func()

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 <n0-1@freewrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Phil Sutter and committed by
Ralf Baechle
0fc6bc0d 3828ee04

+4 -2
+1
arch/mips/include/asm/mach-rc32434/gpio.h
··· 82 82 83 83 extern void rb532_gpio_set_ilevel(int bit, unsigned gpio); 84 84 extern void rb532_gpio_set_istat(int bit, unsigned gpio); 85 + extern void rb532_gpio_set_func(unsigned gpio); 85 86 86 87 #endif /* _RC32434_GPIO_H_ */
+3 -2
arch/mips/rb532/gpio.c
··· 174 174 /* 175 175 * Configure GPIO alternate function 176 176 */ 177 - static void rb532_gpio_set_func(int bit, unsigned gpio) 177 + void rb532_gpio_set_func(unsigned gpio) 178 178 { 179 - rb532_set_bit(bit, gpio, rb532_gpio_chip->regbase + GPIOFUNC); 179 + rb532_set_bit(1, gpio, rb532_gpio_chip->regbase + GPIOFUNC); 180 180 } 181 + EXPORT_SYMBOL(rb532_gpio_set_func); 181 182 182 183 int __init rb532_gpio_init(void) 183 184 {