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

platform/x86: x86-android-tablets: Fix modules lists for Lenovo devices

2 fixes for Lenovo tablets:

- The bq24190 charger on the Lenovo Yoga Tab2 830/1050 devices does not use
the crystal-cove PMIC charger IRQ, so these shouldn't use bq24190_modules
as that includes "intel_crystal_cove_charger"

- Both the Tab2 and the Tab3 devices have a SPI audio-codec which init()
attaches properties to, resp. the whole SPI device gets instantiated by
the x86-android-tablets code. This requires the "spi_pxa2xx_platform"
module to be loaded before init() runs

Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hansg@kernel.org>
Link: https://patch.msgid.link/20250920200713.20193-20-hansg@kernel.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

authored by

Hans de Goede and committed by
Ilpo Järvinen
83fdf93f 6b4bc145

+14 -7
+14 -7
drivers/platform/x86/x86-android-tablets/lenovo.c
··· 443 443 static int __init lenovo_yoga_tab2_830_1050_init(struct device *dev); 444 444 static void lenovo_yoga_tab2_830_1050_exit(void); 445 445 446 + static const char * const lenovo_yoga_tab2_modules[] __initconst = { 447 + "spi_pxa2xx_platform", /* For the SPI codec device */ 448 + "bq24190_charger", /* For the Vbus regulator for int3496/lc824206xa */ 449 + NULL 450 + }; 451 + 446 452 const struct x86_dev_info lenovo_yoga_tab2_830_1050_info __initconst = { 447 453 .i2c_client_info = lenovo_yoga_tab2_830_1050_i2c_clients, 448 454 .i2c_client_count = ARRAY_SIZE(lenovo_yoga_tab2_830_1050_i2c_clients), ··· 456 450 .pdev_count = ARRAY_SIZE(lenovo_yoga_tab2_830_1050_pdevs), 457 451 .gpio_button_swnodes = lenovo_yoga_tab2_830_1050_lid_swnodes, 458 452 .swnode_group = lenovo_yoga_tab2_830_1050_swnodes, 459 - .modules = bq24190_modules, 453 + .modules = lenovo_yoga_tab2_modules, 460 454 .gpiochip_type = X86_GPIOCHIP_BAYTRAIL, 461 455 .init = lenovo_yoga_tab2_830_1050_init, 462 456 .exit = lenovo_yoga_tab2_830_1050_exit, ··· 773 767 }, 774 768 }; 775 769 776 - static const char * const lenovo_yoga_tab2_1380_modules[] __initconst = { 777 - "bq24190_charger", /* For the Vbus regulator for lc824206xa */ 778 - NULL 779 - }; 780 - 781 770 static int __init lenovo_yoga_tab2_1380_init(struct device *dev) 782 771 { 783 772 int ret; ··· 801 800 .pdev_count = ARRAY_SIZE(lenovo_yoga_tab2_1380_pdevs), 802 801 .gpio_button_swnodes = lenovo_yoga_tab2_830_1050_lid_swnodes, 803 802 .swnode_group = lenovo_yoga_tab2_830_1050_swnodes, 804 - .modules = lenovo_yoga_tab2_1380_modules, 803 + .modules = lenovo_yoga_tab2_modules, 805 804 .gpiochip_type = X86_GPIOCHIP_BAYTRAIL, 806 805 .init = lenovo_yoga_tab2_1380_init, 807 806 .exit = lenovo_yoga_tab2_830_1050_exit, ··· 1062 1061 return 0; 1063 1062 } 1064 1063 1064 + static const char * const lenovo_yt3_modules[] __initconst = { 1065 + "spi_pxa2xx_platform", /* For the SPI codec device */ 1066 + NULL 1067 + }; 1068 + 1065 1069 const struct x86_dev_info lenovo_yt3_info __initconst = { 1066 1070 .i2c_client_info = lenovo_yt3_i2c_clients, 1067 1071 .i2c_client_count = ARRAY_SIZE(lenovo_yt3_i2c_clients), 1068 1072 .spi_dev_info = lenovo_yt3_spi_devs, 1069 1073 .spi_dev_count = ARRAY_SIZE(lenovo_yt3_spi_devs), 1070 1074 .swnode_group = lenovo_yt3_swnodes, 1075 + .modules = lenovo_yt3_modules, 1071 1076 .gpiochip_type = X86_GPIOCHIP_CHERRYVIEW, 1072 1077 .init = lenovo_yt3_init, 1073 1078 };