From: Alban Bedel Date: Thu, 28 Jan 2016 19:44:30 +0000 (+0100) Subject: gpio: ath79: Allow building in compile tests X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=409d87838d5755b471933fb2a43f2dfc514ccd2d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git gpio: ath79: Allow building in compile tests To allow building the driver in compile tests we must drop the dependency on asm/mach-ath79/ar71xx_regs.h. For this we replace the include with local definition of the registers needed for this driver. Signed-off-by: Alban Bedel Signed-off-by: Linus Walleij --- diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 020a44a52331..3c1bb917dd72 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -129,7 +129,7 @@ config GPIO_AMDPT config GPIO_ATH79 tristate "Atheros AR71XX/AR724X/AR913X GPIO support" default y if ATH79 - depends on ATH79 + depends on ATH79 || COMPILE_TEST select GPIO_GENERIC help Select this option to enable GPIO driver for diff --git a/drivers/gpio/gpio-ath79.c b/drivers/gpio/gpio-ath79.c index 13d96480a3b2..afb535eef9f3 100644 --- a/drivers/gpio/gpio-ath79.c +++ b/drivers/gpio/gpio-ath79.c @@ -16,7 +16,10 @@ #include #include -#include +#define AR71XX_GPIO_REG_OE 0x00 +#define AR71XX_GPIO_REG_IN 0x04 +#define AR71XX_GPIO_REG_SET 0x0c +#define AR71XX_GPIO_REG_CLEAR 0x10 struct ath79_gpio_ctrl { struct gpio_chip gc;