ARM: spitz: fix GPIO assignment for backlight
[ Upstream commit 78ab3d352f2982bf3f7e506bfbaba7afee1ed8a9 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
c80c5e0ef0
commit
04bd41154c
1 changed files with 10 additions and 20 deletions
|
@ -516,10 +516,8 @@ static struct pxa2xx_spi_chip spitz_ads7846_chip = {
|
|||
static struct gpiod_lookup_table spitz_lcdcon_gpio_table = {
|
||||
.dev_id = "spi2.1",
|
||||
.table = {
|
||||
GPIO_LOOKUP("gpio-pxa", SPITZ_GPIO_BACKLIGHT_CONT,
|
||||
"BL_CONT", GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP("gpio-pxa", SPITZ_GPIO_BACKLIGHT_ON,
|
||||
"BL_ON", GPIO_ACTIVE_HIGH),
|
||||
GPIO_LOOKUP("sharp-scoop.1", 6, "BL_CONT", GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP("sharp-scoop.1", 7, "BL_ON", GPIO_ACTIVE_HIGH),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
@ -527,10 +525,8 @@ static struct gpiod_lookup_table spitz_lcdcon_gpio_table = {
|
|||
static struct gpiod_lookup_table akita_lcdcon_gpio_table = {
|
||||
.dev_id = "spi2.1",
|
||||
.table = {
|
||||
GPIO_LOOKUP("gpio-pxa", AKITA_GPIO_BACKLIGHT_CONT,
|
||||
"BL_CONT", GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP("gpio-pxa", AKITA_GPIO_BACKLIGHT_ON,
|
||||
"BL_ON", GPIO_ACTIVE_HIGH),
|
||||
GPIO_LOOKUP("i2c-max7310", 3, "BL_ON", GPIO_ACTIVE_HIGH),
|
||||
GPIO_LOOKUP("i2c-max7310", 4, "BL_CONT", GPIO_ACTIVE_LOW),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
@ -957,12 +953,9 @@ static inline void spitz_i2c_init(void) {}
|
|||
static struct gpiod_lookup_table spitz_audio_gpio_table = {
|
||||
.dev_id = "spitz-audio",
|
||||
.table = {
|
||||
GPIO_LOOKUP("sharp-scoop.0", SPITZ_GPIO_MUTE_L - SPITZ_SCP_GPIO_BASE,
|
||||
"mute-l", GPIO_ACTIVE_HIGH),
|
||||
GPIO_LOOKUP("sharp-scoop.0", SPITZ_GPIO_MUTE_R - SPITZ_SCP_GPIO_BASE,
|
||||
"mute-r", GPIO_ACTIVE_HIGH),
|
||||
GPIO_LOOKUP("sharp-scoop.1", SPITZ_GPIO_MIC_BIAS - SPITZ_SCP2_GPIO_BASE,
|
||||
"mic", GPIO_ACTIVE_HIGH),
|
||||
GPIO_LOOKUP("sharp-scoop.0", 3, "mute-l", GPIO_ACTIVE_HIGH),
|
||||
GPIO_LOOKUP("sharp-scoop.0", 4, "mute-r", GPIO_ACTIVE_HIGH),
|
||||
GPIO_LOOKUP("sharp-scoop.1", 8, "mic", GPIO_ACTIVE_HIGH),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
@ -970,12 +963,9 @@ static struct gpiod_lookup_table spitz_audio_gpio_table = {
|
|||
static struct gpiod_lookup_table akita_audio_gpio_table = {
|
||||
.dev_id = "spitz-audio",
|
||||
.table = {
|
||||
GPIO_LOOKUP("sharp-scoop.0", SPITZ_GPIO_MUTE_L - SPITZ_SCP_GPIO_BASE,
|
||||
"mute-l", GPIO_ACTIVE_HIGH),
|
||||
GPIO_LOOKUP("sharp-scoop.0", SPITZ_GPIO_MUTE_R - SPITZ_SCP_GPIO_BASE,
|
||||
"mute-r", GPIO_ACTIVE_HIGH),
|
||||
GPIO_LOOKUP("i2c-max7310", AKITA_GPIO_MIC_BIAS - AKITA_IOEXP_GPIO_BASE,
|
||||
"mic", GPIO_ACTIVE_HIGH),
|
||||
GPIO_LOOKUP("sharp-scoop.0", 3, "mute-l", GPIO_ACTIVE_HIGH),
|
||||
GPIO_LOOKUP("sharp-scoop.0", 4, "mute-r", GPIO_ACTIVE_HIGH),
|
||||
GPIO_LOOKUP("i2c-max7310", 2, "mic", GPIO_ACTIVE_HIGH),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue