diff mbox series

[15/46] ARM: pxa: maybe fix gpio lookup tables

Message ID 20191018154201.1276638-15-arnd@arndb.de
State Accepted
Commit 2672a4bff6c03a20d5ae460a091f67ee782c3eff
Headers show
Series [01/46] ARM: pxa: split mach/generic.h | expand

Commit Message

Arnd Bergmann Oct. 18, 2019, 3:41 p.m. UTC
From inspection I found a couple of GPIO lookups that are
listed with device "gpio-pxa", but actually have a number
from a different gpio controller.

Try to rectify that here, with a guess of what the actual
device name is.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-pxa/cm-x300.c  | 8 ++++----
 arch/arm/mach-pxa/magician.c | 2 +-
 arch/arm/mach-pxa/tosa.c     | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

-- 
2.20.0

Comments

Robert Jarzmik Oct. 28, 2019, 8:48 p.m. UTC | #1
Arnd Bergmann <arnd@arndb.de> writes:

> From inspection I found a couple of GPIO lookups that are

> listed with device "gpio-pxa", but actually have a number

> from a different gpio controller.

>

> Try to rectify that here, with a guess of what the actual

> device name is.

>

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Ah yes that's a good catch, maybe something like this could be added :
Fixes: 32d1544880aa ("ARM: pxa: Add gpio descriptor lookup tables for MMC CD/WP")
Fixes: 9b00bc7b901f ("spi: spi-gpio: Rewrite to use GPIO descriptors")

Thanks for fixing this.

Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>


Cheers.

--
Robert
Linus Walleij Nov. 4, 2019, 3:45 p.m. UTC | #2
On Fri, Oct 18, 2019 at 5:42 PM Arnd Bergmann <arnd@arndb.de> wrote:

> From inspection I found a couple of GPIO lookups that are

> listed with device "gpio-pxa", but actually have a number

> from a different gpio controller.

>

> Try to rectify that here, with a guess of what the actual

> device name is.

>

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>


OOps my mistakes:
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>


I suppose this tells us a bit about how much these platforms
are getting tested in real life though :/

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c
index 6cdc440672a6..92fbe4cf71c7 100644
--- a/arch/arm/mach-pxa/cm-x300.c
+++ b/arch/arm/mach-pxa/cm-x300.c
@@ -357,13 +357,13 @@  static struct platform_device cm_x300_spi_gpio = {
 static struct gpiod_lookup_table cm_x300_spi_gpiod_table = {
 	.dev_id         = "spi_gpio",
 	.table          = {
-		GPIO_LOOKUP("gpio-pxa", GPIO_LCD_SCL,
+		GPIO_LOOKUP("pca9555.1", GPIO_LCD_SCL - GPIO_LCD_BASE,
 			    "sck", GPIO_ACTIVE_HIGH),
-		GPIO_LOOKUP("gpio-pxa", GPIO_LCD_DIN,
+		GPIO_LOOKUP("pca9555.1", GPIO_LCD_DIN - GPIO_LCD_BASE,
 			    "mosi", GPIO_ACTIVE_HIGH),
-		GPIO_LOOKUP("gpio-pxa", GPIO_LCD_DOUT,
+		GPIO_LOOKUP("pca9555.1", GPIO_LCD_DOUT - GPIO_LCD_BASE,
 			    "miso", GPIO_ACTIVE_HIGH),
-		GPIO_LOOKUP("gpio-pxa", GPIO_LCD_CS,
+		GPIO_LOOKUP("pca9555.1", GPIO_LCD_CS - GPIO_LCD_BASE,
 			    "cs", GPIO_ACTIVE_HIGH),
 		{ },
 	},
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
index e925f7a8d349..31037679bf24 100644
--- a/arch/arm/mach-pxa/magician.c
+++ b/arch/arm/mach-pxa/magician.c
@@ -675,7 +675,7 @@  static struct platform_device bq24022 = {
 static struct gpiod_lookup_table bq24022_gpiod_table = {
 	.dev_id = "gpio-regulator",
 	.table = {
-		GPIO_LOOKUP("gpio-pxa", EGPIO_MAGICIAN_BQ24022_ISET2,
+		GPIO_LOOKUP("htc-egpio-0", EGPIO_MAGICIAN_BQ24022_ISET2 - MAGICIAN_EGPIO_BASE,
 			    NULL, GPIO_ACTIVE_HIGH),
 		GPIO_LOOKUP("gpio-pxa", GPIO30_MAGICIAN_BQ24022_nCHARGE_EN,
 			    "enable", GPIO_ACTIVE_LOW),
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index 23da9568c520..264b5b6ed13b 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -295,9 +295,9 @@  static struct gpiod_lookup_table tosa_mci_gpio_table = {
 	.table = {
 		GPIO_LOOKUP("gpio-pxa", TOSA_GPIO_nSD_DETECT,
 			    "cd", GPIO_ACTIVE_LOW),
-		GPIO_LOOKUP("gpio-pxa", TOSA_GPIO_SD_WP,
+		GPIO_LOOKUP("sharp-scoop.0", TOSA_GPIO_SD_WP - TOSA_SCOOP_GPIO_BASE,
 			    "wp", GPIO_ACTIVE_LOW),
-		GPIO_LOOKUP("gpio-pxa", TOSA_GPIO_PWR_ON,
+		GPIO_LOOKUP("sharp-scoop.0", TOSA_GPIO_PWR_ON - TOSA_SCOOP_GPIO_BASE,
 			    "power", GPIO_ACTIVE_HIGH),
 		{ },
 	},