[PATCH 6/6] platform/x86: x86-android-tablets: use shared battery swnode group on Yoga Tab 2
From: Dmitry Torokhov
Date: Sun Aug 30 2026 - 07:17:06 EST
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@xxxxxxxxx>
---
drivers/platform/x86/x86-android-tablets/lenovo.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/platform/x86/x86-android-tablets/lenovo.c b/drivers/platform/x86/x86-android-tablets/lenovo.c
index cd8cee1f4aed..52d96ae89078 100644
--- a/drivers/platform/x86/x86-android-tablets/lenovo.c
+++ b/drivers/platform/x86/x86-android-tablets/lenovo.c
@@ -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,
--
2.55.0.897.gb25b4bd76c-goog