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

Configure Feed

Select the types of activity you want to include in your feed.

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: ee0c8e494cc3 ("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>

authored by

Dmitry Torokhov and committed by
Arnd Bergmann
78ab3d35 696a2af2

+10 -20
+10 -20
arch/arm/mach-pxa/spitz.c
··· 520 520 static struct gpiod_lookup_table spitz_lcdcon_gpio_table = { 521 521 .dev_id = "spi2.1", 522 522 .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), 527 525 { }, 528 526 }, 529 527 }; ··· 529 531 static struct gpiod_lookup_table akita_lcdcon_gpio_table = { 530 532 .dev_id = "spi2.1", 531 533 .table = { 532 - GPIO_LOOKUP("gpio-pxa", AKITA_GPIO_BACKLIGHT_CONT, 533 - "BL_CONT", GPIO_ACTIVE_LOW), 534 - GPIO_LOOKUP("gpio-pxa", AKITA_GPIO_BACKLIGHT_ON, 535 - "BL_ON", GPIO_ACTIVE_HIGH), 534 + GPIO_LOOKUP("i2c-max7310", 3, "BL_ON", GPIO_ACTIVE_HIGH), 535 + GPIO_LOOKUP("i2c-max7310", 4, "BL_CONT", GPIO_ACTIVE_LOW), 536 536 { }, 537 537 }, 538 538 }; ··· 960 964 static struct gpiod_lookup_table spitz_audio_gpio_table = { 961 965 .dev_id = "spitz-audio", 962 966 .table = { 963 - GPIO_LOOKUP("sharp-scoop.0", SPITZ_GPIO_MUTE_L - SPITZ_SCP_GPIO_BASE, 964 - "mute-l", GPIO_ACTIVE_HIGH), 965 - GPIO_LOOKUP("sharp-scoop.0", SPITZ_GPIO_MUTE_R - SPITZ_SCP_GPIO_BASE, 966 - "mute-r", GPIO_ACTIVE_HIGH), 967 - GPIO_LOOKUP("sharp-scoop.1", SPITZ_GPIO_MIC_BIAS - SPITZ_SCP2_GPIO_BASE, 968 - "mic", GPIO_ACTIVE_HIGH), 967 + GPIO_LOOKUP("sharp-scoop.0", 3, "mute-l", GPIO_ACTIVE_HIGH), 968 + GPIO_LOOKUP("sharp-scoop.0", 4, "mute-r", GPIO_ACTIVE_HIGH), 969 + GPIO_LOOKUP("sharp-scoop.1", 8, "mic", GPIO_ACTIVE_HIGH), 969 970 { }, 970 971 }, 971 972 }; ··· 970 977 static struct gpiod_lookup_table akita_audio_gpio_table = { 971 978 .dev_id = "spitz-audio", 972 979 .table = { 973 - GPIO_LOOKUP("sharp-scoop.0", SPITZ_GPIO_MUTE_L - SPITZ_SCP_GPIO_BASE, 974 - "mute-l", GPIO_ACTIVE_HIGH), 975 - GPIO_LOOKUP("sharp-scoop.0", SPITZ_GPIO_MUTE_R - SPITZ_SCP_GPIO_BASE, 976 - "mute-r", GPIO_ACTIVE_HIGH), 977 - GPIO_LOOKUP("i2c-max7310", AKITA_GPIO_MIC_BIAS - AKITA_IOEXP_GPIO_BASE, 978 - "mic", GPIO_ACTIVE_HIGH), 980 + GPIO_LOOKUP("sharp-scoop.0", 3, "mute-l", GPIO_ACTIVE_HIGH), 981 + GPIO_LOOKUP("sharp-scoop.0", 4, "mute-r", GPIO_ACTIVE_HIGH), 982 + GPIO_LOOKUP("i2c-max7310", 2, "mic", GPIO_ACTIVE_HIGH), 979 983 { }, 980 984 }, 981 985 };