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: Use software nodes to describe LCD GPIOs

Convert Spitz to use software nodes for specifying GPIOs for the LCD.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20240628180852.1738922-8-dmitry.torokhov@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

authored by

Dmitry Torokhov and committed by
Arnd Bergmann
1447c7df 9d91c7c3

+19 -19
+19 -19
arch/arm/mach-pxa/spitz.c
··· 532 532 }, 533 533 }; 534 534 535 - static struct gpiod_lookup_table spitz_lcdcon_gpio_table = { 536 - .dev_id = "spi2.1", 537 - .table = { 538 - GPIO_LOOKUP("sharp-scoop.1", 6, "BL_CONT", GPIO_ACTIVE_LOW), 539 - GPIO_LOOKUP("sharp-scoop.1", 7, "BL_ON", GPIO_ACTIVE_HIGH), 540 - { }, 541 - }, 535 + static const struct property_entry spitz_lcdcon_props[] = { 536 + PROPERTY_ENTRY_GPIO("BL_CONT-gpios", 537 + &spitz_scoop_2_gpiochip_node, 6, GPIO_ACTIVE_LOW), 538 + PROPERTY_ENTRY_GPIO("BL_ON-gpios", 539 + &spitz_scoop_2_gpiochip_node, 7, GPIO_ACTIVE_HIGH), 540 + { } 542 541 }; 543 542 544 - static struct gpiod_lookup_table akita_lcdcon_gpio_table = { 545 - .dev_id = "spi2.1", 546 - .table = { 547 - GPIO_LOOKUP("i2c-max7310", 3, "BL_ON", GPIO_ACTIVE_HIGH), 548 - GPIO_LOOKUP("i2c-max7310", 4, "BL_CONT", GPIO_ACTIVE_LOW), 549 - { }, 550 - }, 543 + static const struct property_entry akita_lcdcon_props[] = { 544 + PROPERTY_ENTRY_GPIO("BL_ON-gpios", 545 + &akita_max7310_gpiochip_node, 3, GPIO_ACTIVE_HIGH), 546 + PROPERTY_ENTRY_GPIO("BL_CONT-gpios", 547 + &akita_max7310_gpiochip_node, 4, GPIO_ACTIVE_LOW), 548 + { } 549 + }; 550 + 551 + static struct software_node spitz_lcdcon_node = { 552 + .name = "spitz-lcdcon", 551 553 }; 552 554 553 555 static struct corgi_lcd_platform_data spitz_lcdcon_info = { ··· 574 572 .bus_num = 2, 575 573 .chip_select = 1, 576 574 .platform_data = &spitz_lcdcon_info, 575 + .swnode = &spitz_lcdcon_node, 577 576 }, { 578 577 .modalias = "max1111", 579 578 .max_speed_hz = 450000, ··· 609 606 struct platform_device *pd; 610 607 int err; 611 608 612 - if (machine_is_akita()) 613 - gpiod_add_lookup_table(&akita_lcdcon_gpio_table); 614 - else 615 - gpiod_add_lookup_table(&spitz_lcdcon_gpio_table); 616 - 617 609 gpiod_add_lookup_table(&spitz_ads7846_gpio_table); 618 610 619 611 pd = platform_device_register_full(&spitz_spi_device_info); ··· 617 619 pr_err("pxa2xx-spi: failed to instantiate SPI controller: %d\n", 618 620 err); 619 621 622 + spitz_lcdcon_node.properties = machine_is_akita() ? 623 + akita_lcdcon_props : spitz_lcdcon_props; 620 624 spi_register_board_info(ARRAY_AND_SIZE(spitz_spi_devices)); 621 625 } 622 626 #else