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

OMAP/gpio: drop MPUIO static base

The OMAP GPIO driver hardcodes the MPIO chip base, but there
is no point: we have already moved all consumers over to using
descriptor look-ups.

Drop the MPUIO GPIO base and use dynamic assignment.

Root out the unused instances of the OMAP_MPUIO() macro and
delete the unused OMAP_GPIO_IS_MPUIO() macro.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Tested-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

authored by

Linus Walleij and committed by
Bartosz Golaszewski
968118fc c31071ea

+1 -10
-5
arch/arm/mach-omap1/board-palmte.c
··· 51 51 #define PALMTE_HDQ_GPIO 11 52 52 #define PALMTE_HEADPHONES_GPIO 14 53 53 #define PALMTE_SPEAKER_GPIO 15 54 - #define PALMTE_DC_GPIO OMAP_MPUIO(2) 55 - #define PALMTE_MMC_SWITCH_GPIO OMAP_MPUIO(4) 56 - #define PALMTE_MMC1_GPIO OMAP_MPUIO(6) 57 - #define PALMTE_MMC2_GPIO OMAP_MPUIO(7) 58 - #define PALMTE_MMC3_GPIO OMAP_MPUIO(11) 59 54 60 55 static const unsigned int palmte_keymap[] = { 61 56 KEY(0, 0, KEY_F1), /* Calendar */
+1 -2
drivers/gpio/gpio-omap.c
··· 1048 1048 bank->chip.label = "mpuio"; 1049 1049 if (bank->regs->wkup_en) 1050 1050 bank->chip.parent = &omap_mpuio_device.dev; 1051 - bank->chip.base = OMAP_MPUIO(0); 1052 1051 } else { 1053 1052 label = devm_kasprintf(bank->chip.parent, GFP_KERNEL, "gpio-%d-%d", 1054 1053 gpio, gpio + bank->width - 1); 1055 1054 if (!label) 1056 1055 return -ENOMEM; 1057 1056 bank->chip.label = label; 1058 - bank->chip.base = -1; 1059 1057 } 1058 + bank->chip.base = -1; 1060 1059 bank->chip.ngpio = bank->width; 1061 1060 1062 1061 irq = &bank->chip.irq;
-3
include/linux/platform_data/gpio-omap.h
··· 144 144 145 145 #define OMAP_MAX_GPIO_LINES 192 146 146 147 - #define OMAP_MPUIO(nr) (OMAP_MAX_GPIO_LINES + (nr)) 148 - #define OMAP_GPIO_IS_MPUIO(nr) ((nr) >= OMAP_MAX_GPIO_LINES) 149 - 150 147 #ifndef __ASSEMBLER__ 151 148 struct omap_gpio_reg_offs { 152 149 u16 revision;