Message ID | 1412972930-16777-5-git-send-email-blogic@openwrt.org |
---|---|
State | Not Applicable |
Headers | show |
On Fri, Oct 10, 2014 at 10:28 PM, John Crispin <blogic@openwrt.org> wrote: > Select ARCH_REQUIRE_GPIOLIB by default when building a kernel for RALINK. > > Signed-off-by: John Crispin <blogic@openwrt.org> Happy with selecting this, but don't think you need the altered mach gpio.h header. Do like x86 does. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 2d255e8..380cce3 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -453,6 +453,7 @@ config RALINK select RESET_CONTROLLER select PINCTRL select PINCTRL_RT2880 + select ARCH_REQUIRE_GPIOLIB config SGI_IP22 bool "SGI IP22 (Indy/Indigo2)" diff --git a/arch/mips/include/asm/mach-ralink/gpio.h b/arch/mips/include/asm/mach-ralink/gpio.h new file mode 100644 index 0000000..f68ee16 --- /dev/null +++ b/arch/mips/include/asm/mach-ralink/gpio.h @@ -0,0 +1,24 @@ +/* + * Ralink SoC GPIO API support + * + * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org> + * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + * + */ + +#ifndef __ASM_MACH_RALINK_GPIO_H +#define __ASM_MACH_RALINK_GPIO_H + +#define ARCH_NR_GPIOS 128 +#include <asm-generic/gpio.h> + +#define gpio_get_value __gpio_get_value +#define gpio_set_value __gpio_set_value +#define gpio_cansleep __gpio_cansleep +#define gpio_to_irq __gpio_to_irq + +#endif /* __ASM_MACH_RALINK_GPIO_H */
Select ARCH_REQUIRE_GPIOLIB by default when building a kernel for RALINK. Signed-off-by: John Crispin <blogic@openwrt.org> --- arch/mips/Kconfig | 1 + arch/mips/include/asm/mach-ralink/gpio.h | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 arch/mips/include/asm/mach-ralink/gpio.h