MIPS: Remove all the uses of custom gpio.h

Currently CONFIG_ARCH_HAVE_CUSTOM_GPIO_H is defined for all MIPS
machines, and each machine type provides its own gpio.h. However
only a handful really implement the GPIO API, most just forward
everythings to gpiolib.

The Alchemy machine is notable as it provides a system to allow
implementing the GPIO API at the board level. But it is not used by
any board currently supported, so it can also be removed.

For most machine types we can just remove the custom gpio.h, as well
as the custom wrappers if some exists. Some of the code found in
the wrappers must be moved to the respective GPIO driver.

A few more fixes are need in some drivers as they rely on linux/gpio.h
to provides some machine specific definitions, or used asm/gpio.h
instead of linux/gpio.h for the gpio API.

Signed-off-by: Alban Bedel <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Cc: [email protected]
Cc: Hauke Mehrtens <[email protected]>
Cc: Rafał Miłecki <[email protected]>
Cc: Bartlomiej Zolnierkiewicz <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Alexandre Courbot <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Cc: Florian Fainelli <[email protected]>
Cc: Manuel Lauss <[email protected]>
Cc: Joe Perches <[email protected]>
Cc: Daniel Walter <[email protected]>
Cc: Sergey Ryazanov <[email protected]>
Cc: Huacai Chen <[email protected]>
Cc: James Hartley <[email protected]>
Cc: Andrew Bresticker <[email protected]>
Cc: Paul Burton <[email protected]>
Cc: Jiri Kosina <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Cc: Wolfram Sang <[email protected]>
Cc: Randy Dunlap <[email protected]>
Cc: Varka Bhadram <[email protected]>
Cc: Masanari Iida <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Cc: Michael Buesch <[email protected]>
Cc: abdoulaye berthe <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/10828/
Signed-off-by: Ralf Baechle <[email protected]>
This commit is contained in:
Alban Bedel 2015-08-02 18:30:11 +02:00 • committed by Ralf Baechle
commit 832f5dacfa
37 changed files with 45 additions and 551 deletions

View file

@ -202,35 +202,3 @@ static struct platform_driver ath79_gpio_driver = {
};
module_platform_driver(ath79_gpio_driver);
int gpio_get_value(unsigned gpio)
{
if (gpio < ath79_gpio_count)
return __ath79_gpio_get_value(gpio);
return __gpio_get_value(gpio);
}
EXPORT_SYMBOL(gpio_get_value);
void gpio_set_value(unsigned gpio, int value)
{
if (gpio < ath79_gpio_count)
__ath79_gpio_set_value(gpio, value);
else
__gpio_set_value(gpio, value);
}
EXPORT_SYMBOL(gpio_set_value);
int gpio_to_irq(unsigned gpio)
{
/* FIXME */
return -EINVAL;
}
EXPORT_SYMBOL(gpio_to_irq);
int irq_to_gpio(unsigned irq)
{
/* FIXME */
return -EINVAL;
}
EXPORT_SYMBOL(irq_to_gpio);