Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0fc6bc0d authored by Phil Sutter's avatar Phil Sutter Committed by Ralf Baechle
Browse files

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: default avatarPhil Sutter <n0-1@freewrt.org>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 3828ee04
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -82,5 +82,6 @@ struct rb532_gpio_reg {


extern void rb532_gpio_set_ilevel(int bit, unsigned gpio);
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_istat(int bit, unsigned gpio);
extern void rb532_gpio_set_func(unsigned gpio);


#endif /* _RC32434_GPIO_H_ */
#endif /* _RC32434_GPIO_H_ */
+3 −2
Original line number Original line Diff line number Diff line
@@ -174,10 +174,11 @@ EXPORT_SYMBOL(rb532_gpio_set_istat);
/*
/*
 * Configure GPIO alternate function
 * 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)
int __init rb532_gpio_init(void)
{
{