platform/x86: x86-android-tablets: use shared battery swnode group on Yoga Tab 2

The WM5102 codec software node lenovo_yoga_tab2_830_1050_wm5102 is
registered automatically when attached to the codec device via
device_add_software_node() in lenovo_yoga_tab2_830_1050_init_codec().

Including it in lenovo_yoga_tab2_830_1050_swnodes is therefore
redundant, leaving generic_lipo_hv_4v35_battery_node as the only node
needing registration.

Switch lenovo_yoga_tab2_830_1050_info and lenovo_yoga_tab2_1380_info to
use the shared generic_lipo_hv_4v35_battery_swnodes group directly and
drop the custom lenovo_yoga_tab2_830_1050_swnodes array.

Assisted-by: LLM
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Tested-by: Hans de Goede <johannes.goede@oss.qualcomm.com> # Yoga tab 2 1380, yt3
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260830-x86-android-lenovo-swnode-v1-6-066a91acb4ba@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
Dmitry Torokhov 2026-08-30 04:15:10 -07:00 committed by Ilpo Järvinen
parent 74884436a5
commit 312fd3f3a8
No known key found for this signature in database
GPG Key ID: 59AC4F6153E5CE31

View File

@ -427,12 +427,6 @@ static const struct software_node lenovo_yoga_tab2_830_1050_wm5102 = {
.properties = lenovo_yoga_tab2_830_1050_wm1502_props,
};
static const struct software_node *lenovo_yoga_tab2_830_1050_swnodes[] = {
&lenovo_yoga_tab2_830_1050_wm5102,
&generic_lipo_hv_4v35_battery_node,
NULL
};
static int __init lenovo_yoga_tab2_830_1050_init(struct device *dev);
static void lenovo_yoga_tab2_830_1050_exit(void);
@ -448,7 +442,7 @@ const struct x86_dev_info lenovo_yoga_tab2_830_1050_info __initconst = {
.pdev_info = lenovo_yoga_tab2_830_1050_pdevs,
.pdev_count = ARRAY_SIZE(lenovo_yoga_tab2_830_1050_pdevs),
.gpio_button_swnodes = lenovo_yoga_tab2_830_1050_lid_swnodes,
.swnode_group = lenovo_yoga_tab2_830_1050_swnodes,
.swnode_group = generic_lipo_hv_4v35_battery_swnodes,
.modules = lenovo_yoga_tab2_modules,
.has_crystalcove = true,
.gpiochip_type = X86_GPIOCHIP_BAYTRAIL,
@ -794,7 +788,7 @@ const struct x86_dev_info lenovo_yoga_tab2_1380_info __initconst = {
.pdev_info = lenovo_yoga_tab2_1380_pdevs,
.pdev_count = ARRAY_SIZE(lenovo_yoga_tab2_1380_pdevs),
.gpio_button_swnodes = lenovo_yoga_tab2_830_1050_lid_swnodes,
.swnode_group = lenovo_yoga_tab2_830_1050_swnodes,
.swnode_group = generic_lipo_hv_4v35_battery_swnodes,
.modules = lenovo_yoga_tab2_modules,
.has_crystalcove = true,
.gpiochip_type = X86_GPIOCHIP_BAYTRAIL,