ARM: pxa: maybe fix gpio lookup tables
authorArnd Bergmann <arnd@arndb.de>
Wed, 11 Sep 2019 20:31:51 +0000 (22:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:23:29 +0000 (10:23 +0200)
commit 2672a4bff6c03a20d5ae460a091f67ee782c3eff upstream.

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.

Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Cc: stable@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/mach-pxa/cm-x300.c
arch/arm/mach-pxa/magician.c
arch/arm/mach-pxa/tosa.c

index 2e35354b61f56436745af60a67e2143e816cbdde..167e871f059ef87e1a7fa69227a30a80e30d8521 100644 (file)
@@ -354,13 +354,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),
                { },
        },
index cd9fa465b9b2a6c62e007c23746fa72f9654b37b..9aee8e0f2bb1d7dd3097234d34e8e776b05c6ae8 100644 (file)
@@ -681,7 +681,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),
index 431709725d02bbd5878502f5f17b147e8fa0c341..ded5e343e19845597da2d66eccdf95da5544e5f6 100644 (file)
@@ -296,9 +296,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),
                { },
        },