Skip to content

Commit 78ab3d3

Browse files
dtorarndb
authored andcommitted
ARM: spitz: fix GPIO assignment for backlight
GPIOs controlling backlight on Spitz and Akita are coming from GPIO expanders, not the pxa27xx-gpio block, correct it. Additionally GPIO lookup tables operate with pin numbers rather than legacy GPIO numbers, fix that as well. Use raw numbers instead of legacy GPIO names to avoid confusion. Fixes: ee0c8e4 ("backlight: corgi: Convert to use GPIO descriptors") Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://lore.kernel.org/r/20240628180852.1738922-2-dmitry.torokhov@gmail.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent 696a2af commit 78ab3d3

1 file changed

Lines changed: 10 additions & 20 deletions

File tree

arch/arm/mach-pxa/spitz.c

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -520,21 +520,17 @@ static struct gpiod_lookup_table spitz_ads7846_gpio_table = {
520520
static struct gpiod_lookup_table spitz_lcdcon_gpio_table = {
521521
.dev_id = "spi2.1",
522522
.table = {
523-
GPIO_LOOKUP("gpio-pxa", SPITZ_GPIO_BACKLIGHT_CONT,
524-
"BL_CONT", GPIO_ACTIVE_LOW),
525-
GPIO_LOOKUP("gpio-pxa", SPITZ_GPIO_BACKLIGHT_ON,
526-
"BL_ON", GPIO_ACTIVE_HIGH),
523+
GPIO_LOOKUP("sharp-scoop.1", 6, "BL_CONT", GPIO_ACTIVE_LOW),
524+
GPIO_LOOKUP("sharp-scoop.1", 7, "BL_ON", GPIO_ACTIVE_HIGH),
527525
{ },
528526
},
529527
};
530528

531529
static struct gpiod_lookup_table akita_lcdcon_gpio_table = {
532530
.dev_id = "spi2.1",
533531
.table = {
534-
GPIO_LOOKUP("gpio-pxa", AKITA_GPIO_BACKLIGHT_CONT,
535-
"BL_CONT", GPIO_ACTIVE_LOW),
536-
GPIO_LOOKUP("gpio-pxa", AKITA_GPIO_BACKLIGHT_ON,
537-
"BL_ON", GPIO_ACTIVE_HIGH),
532+
GPIO_LOOKUP("i2c-max7310", 3, "BL_ON", GPIO_ACTIVE_HIGH),
533+
GPIO_LOOKUP("i2c-max7310", 4, "BL_CONT", GPIO_ACTIVE_LOW),
538534
{ },
539535
},
540536
};
@@ -964,25 +960,19 @@ static inline void spitz_i2c_init(void) {}
964960
static struct gpiod_lookup_table spitz_audio_gpio_table = {
965961
.dev_id = "spitz-audio",
966962
.table = {
967-
GPIO_LOOKUP("sharp-scoop.0", SPITZ_GPIO_MUTE_L - SPITZ_SCP_GPIO_BASE,
968-
"mute-l", GPIO_ACTIVE_HIGH),
969-
GPIO_LOOKUP("sharp-scoop.0", SPITZ_GPIO_MUTE_R - SPITZ_SCP_GPIO_BASE,
970-
"mute-r", GPIO_ACTIVE_HIGH),
971-
GPIO_LOOKUP("sharp-scoop.1", SPITZ_GPIO_MIC_BIAS - SPITZ_SCP2_GPIO_BASE,
972-
"mic", GPIO_ACTIVE_HIGH),
963+
GPIO_LOOKUP("sharp-scoop.0", 3, "mute-l", GPIO_ACTIVE_HIGH),
964+
GPIO_LOOKUP("sharp-scoop.0", 4, "mute-r", GPIO_ACTIVE_HIGH),
965+
GPIO_LOOKUP("sharp-scoop.1", 8, "mic", GPIO_ACTIVE_HIGH),
973966
{ },
974967
},
975968
};
976969

977970
static struct gpiod_lookup_table akita_audio_gpio_table = {
978971
.dev_id = "spitz-audio",
979972
.table = {
980-
GPIO_LOOKUP("sharp-scoop.0", SPITZ_GPIO_MUTE_L - SPITZ_SCP_GPIO_BASE,
981-
"mute-l", GPIO_ACTIVE_HIGH),
982-
GPIO_LOOKUP("sharp-scoop.0", SPITZ_GPIO_MUTE_R - SPITZ_SCP_GPIO_BASE,
983-
"mute-r", GPIO_ACTIVE_HIGH),
984-
GPIO_LOOKUP("i2c-max7310", AKITA_GPIO_MIC_BIAS - AKITA_IOEXP_GPIO_BASE,
985-
"mic", GPIO_ACTIVE_HIGH),
973+
GPIO_LOOKUP("sharp-scoop.0", 3, "mute-l", GPIO_ACTIVE_HIGH),
974+
GPIO_LOOKUP("sharp-scoop.0", 4, "mute-r", GPIO_ACTIVE_HIGH),
975+
GPIO_LOOKUP("i2c-max7310", 2, "mic", GPIO_ACTIVE_HIGH),
986976
{ },
987977
},
988978
};

0 commit comments

Comments
 (0)