* [PATCH 1/6] platform/x86: x86-android-tablets: fix Arizona GPIO swnode references
2026-08-30 11:15 [PATCH 0/6] platform/x86: x86-android-tablets: fix Arizona and Crystal Cove GPIO lookups Dmitry Torokhov
@ 2026-08-30 11:15 ` Dmitry Torokhov
2026-08-30 11:15 ` [PATCH 2/6] platform/x86: x86-android-tablets: hold device reference for secondary fwnode teardown Dmitry Torokhov
` (8 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2026-08-30 11:15 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen, Andy Shevchenko,
Bartosz Golaszewski, Linus Walleij, Rafael J. Wysocki
Cc: platform-driver-x86, linux-kernel
The standalone arizona_gpiochip_node was created when gpiolib supported
matching a software node name against the GPIO chip label ("arizona").
Later, gpiolib replaced name matching with firmware node identity
mapping (and eventually dropped the fallback mechanism), causing GPIO
lookups on unattached software nodes to fail.
In gpio-arizona, the GPIO chip inherits the firmware node of the parent
codec device. Fix the lookups by pointing the GPIO property entries
directly to the codec device software node (which is attached to the
parent device) and dropping the obsolete arizona_gpiochip_node.
Fixes: 611fd6cfe139 ("gpio: swnode: remove deprecated lookup mechanism")
Assisted-by: LLM
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/platform/x86/x86-android-tablets/lenovo.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/drivers/platform/x86/x86-android-tablets/lenovo.c b/drivers/platform/x86/x86-android-tablets/lenovo.c
index 8d825e0b4661..c34f62bdf8f9 100644
--- a/drivers/platform/x86/x86-android-tablets/lenovo.c
+++ b/drivers/platform/x86/x86-android-tablets/lenovo.c
@@ -61,10 +61,6 @@ static struct lp855x_platform_data lenovo_lp8557_reg_only_pdata = {
.initial_brightness = 128,
};
-static const struct software_node arizona_gpiochip_node = {
- .name = "arizona",
-};
-
static const struct software_node crystalcove_gpiochip_node = {
.name = "gpio_crystalcove",
};
@@ -416,15 +412,17 @@ static const struct platform_device_info lenovo_yoga_tab2_830_1050_pdevs[] __ini
#define LENOVO_YOGA_TAB2_830_1050_CODEC_NAME "spi-10WM5102:00"
+static const struct software_node lenovo_yoga_tab2_830_1050_wm5102;
+
static const struct property_entry lenovo_yoga_tab2_830_1050_wm1502_props[] = {
PROPERTY_ENTRY_GPIO("reset-gpios",
&crystalcove_gpiochip_node, 3, GPIO_ACTIVE_HIGH),
PROPERTY_ENTRY_GPIO("wlf,ldoena-gpios",
&baytrail_gpiochip_nodes[1], 23, GPIO_ACTIVE_HIGH),
PROPERTY_ENTRY_GPIO("wlf,spkvdd-ena-gpios",
- &arizona_gpiochip_node, 2, GPIO_ACTIVE_HIGH),
+ &lenovo_yoga_tab2_830_1050_wm5102, 2, GPIO_ACTIVE_HIGH),
PROPERTY_ENTRY_GPIO("wlf,micd-pol-gpios",
- &arizona_gpiochip_node, 4, GPIO_ACTIVE_LOW),
+ &lenovo_yoga_tab2_830_1050_wm5102, 4, GPIO_ACTIVE_LOW),
{ }
};
@@ -434,7 +432,6 @@ static const struct software_node lenovo_yoga_tab2_830_1050_wm5102 = {
static const struct software_node *lenovo_yoga_tab2_830_1050_swnodes[] = {
&crystalcove_gpiochip_node,
- &arizona_gpiochip_node,
&lenovo_yoga_tab2_830_1050_wm5102,
&generic_lipo_hv_4v35_battery_node,
NULL
@@ -985,13 +982,15 @@ static struct arizona_pdata lenovo_yt3_wm5102_pdata = {
},
};
+static const struct software_node lenovo_yt3_wm5102;
+
static const struct property_entry lenovo_yt3_wm1502_props[] = {
PROPERTY_ENTRY_GPIO("wlf,spkvdd-ena-gpios",
&cherryview_gpiochip_nodes[0], 75, GPIO_ACTIVE_HIGH),
PROPERTY_ENTRY_GPIO("wlf,ldoena-gpios",
&cherryview_gpiochip_nodes[0], 81, GPIO_ACTIVE_HIGH),
PROPERTY_ENTRY_GPIO("reset-gpios", &cherryview_gpiochip_nodes[0], 82, GPIO_ACTIVE_HIGH),
- PROPERTY_ENTRY_GPIO("wlf,micd-pol-gpios", &arizona_gpiochip_node, 2, GPIO_ACTIVE_HIGH),
+ PROPERTY_ENTRY_GPIO("wlf,micd-pol-gpios", &lenovo_yt3_wm5102, 2, GPIO_ACTIVE_HIGH),
{ }
};
@@ -1001,7 +1000,6 @@ static const struct software_node lenovo_yt3_wm5102 = {
};
static const struct software_node *lenovo_yt3_swnodes[] = {
- &arizona_gpiochip_node,
&lenovo_yt3_wm5102,
NULL
};
--
2.55.0.897.gb25b4bd76c-goog
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 2/6] platform/x86: x86-android-tablets: hold device reference for secondary fwnode teardown
2026-08-30 11:15 [PATCH 0/6] platform/x86: x86-android-tablets: fix Arizona and Crystal Cove GPIO lookups Dmitry Torokhov
2026-08-30 11:15 ` [PATCH 1/6] platform/x86: x86-android-tablets: fix Arizona GPIO swnode references Dmitry Torokhov
@ 2026-08-30 11:15 ` Dmitry Torokhov
2026-08-30 11:15 ` [PATCH 3/6] platform/x86: x86-android-tablets: pass node group to gpio_secondary_fwnode_init() Dmitry Torokhov
` (7 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2026-08-30 11:15 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen, Andy Shevchenko,
Bartosz Golaszewski, Linus Walleij, Rafael J. Wysocki
Cc: platform-driver-x86, linux-kernel
In gpio_secondary_fwnode_init(), acpi_bus_find_device_by_name() returns a
device reference, but the local dev variable is declared with
__free(put_device), dropping the reference at the end of each iteration.
Meanwhile, devm_add_action_or_reset() saves the dev pointer for
gpio_secondary_unset() without incrementing its reference count, which
could lead to a use-after-free during driver teardown if the device is
released in the interim.
Acquire an explicit device reference with get_device() when registering
the devres action, and drop it with put_device() inside
gpio_secondary_unset().
Fixes: 1448c2d2ca5c ("platform/x86: x86-android-tablets: enable fwnode matching of GPIO chips")
Assisted-by: LLM
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/platform/x86/x86-android-tablets/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/x86-android-tablets/core.c b/drivers/platform/x86/x86-android-tablets/core.c
index 5db794d65eb5..722c0ae4ecd1 100644
--- a/drivers/platform/x86/x86-android-tablets/core.c
+++ b/drivers/platform/x86/x86-android-tablets/core.c
@@ -367,6 +367,7 @@ static void gpio_secondary_unset(void *data)
struct device *dev = data;
set_secondary_fwnode(dev, NULL);
+ put_device(dev);
}
static void gpio_secondary_unregister_node_group(void *data)
@@ -409,7 +410,7 @@ static int gpio_secondary_fwnode_init(struct device *parent)
set_secondary_fwnode(dev, fwnode);
- ret = devm_add_action_or_reset(parent, gpio_secondary_unset, dev);
+ ret = devm_add_action_or_reset(parent, gpio_secondary_unset, get_device(dev));
if (ret)
return ret;
}
--
2.55.0.897.gb25b4bd76c-goog
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 3/6] platform/x86: x86-android-tablets: pass node group to gpio_secondary_fwnode_init()
2026-08-30 11:15 [PATCH 0/6] platform/x86: x86-android-tablets: fix Arizona and Crystal Cove GPIO lookups Dmitry Torokhov
2026-08-30 11:15 ` [PATCH 1/6] platform/x86: x86-android-tablets: fix Arizona GPIO swnode references Dmitry Torokhov
2026-08-30 11:15 ` [PATCH 2/6] platform/x86: x86-android-tablets: hold device reference for secondary fwnode teardown Dmitry Torokhov
@ 2026-08-30 11:15 ` Dmitry Torokhov
2026-08-30 11:15 ` [PATCH 4/6] platform/x86: x86-android-tablets: add Crystal Cove GPIO swnode support Dmitry Torokhov
` (6 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2026-08-30 11:15 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen, Andy Shevchenko,
Bartosz Golaszewski, Linus Walleij, Rafael J. Wysocki
Cc: platform-driver-x86, linux-kernel
Currently gpio_secondary_fwnode_init() uses a file-scope static
gpiochip_node_group variable initialized in probe.
Pass the node group directly to gpio_secondary_fwnode_init() as an
argument instead of using a global variable. This allows reusing the
helper for additional GPIO controllers in subsequent patches.
Assisted-by: LLM
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/platform/x86/x86-android-tablets/core.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/platform/x86/x86-android-tablets/core.c b/drivers/platform/x86/x86-android-tablets/core.c
index 722c0ae4ecd1..45673bfc0b7b 100644
--- a/drivers/platform/x86/x86-android-tablets/core.c
+++ b/drivers/platform/x86/x86-android-tablets/core.c
@@ -156,7 +156,6 @@ static struct platform_device **pdevs;
static struct serdev_device **serdevs;
static const struct software_node **gpio_button_swnodes;
static const struct software_node **swnode_group;
-static const struct software_node **gpiochip_node_group;
static void (*exit_handler)(void);
static __init struct i2c_adapter *
@@ -377,26 +376,27 @@ static void gpio_secondary_unregister_node_group(void *data)
software_node_unregister_node_group(nodes);
}
-static int gpio_secondary_fwnode_init(struct device *parent)
+static int gpio_secondary_fwnode_init(struct device *parent,
+ const struct software_node * const *node_group)
{
const struct software_node *const *swnode;
struct fwnode_handle *fwnode;
int ret;
- if (!gpiochip_node_group)
+ if (!node_group)
return 0;
- ret = software_node_register_node_group(gpiochip_node_group);
+ ret = software_node_register_node_group(node_group);
if (ret)
return ret;
ret = devm_add_action_or_reset(parent,
gpio_secondary_unregister_node_group,
- gpiochip_node_group);
+ (void *)node_group);
if (ret)
return ret;
- for (swnode = gpiochip_node_group; *swnode; swnode++) {
+ for (swnode = node_group; *swnode; swnode++) {
struct device *dev __free(put_device) =
acpi_bus_find_device_by_name((*swnode)->name);
if (!dev)
@@ -453,6 +453,7 @@ static void x86_android_tablet_remove(struct platform_device *pdev)
static __init int x86_android_tablet_probe(struct platform_device *pdev)
{
+ const struct software_node * const *gpiochip_node_group;
const struct x86_dev_info *dev_info;
const struct dmi_system_id *id;
int i, ret = 0;
@@ -484,7 +485,7 @@ static __init int x86_android_tablet_probe(struct platform_device *pdev)
break;
}
- ret = gpio_secondary_fwnode_init(&pdev->dev);
+ ret = gpio_secondary_fwnode_init(&pdev->dev, gpiochip_node_group);
if (ret) {
x86_android_tablet_remove(pdev);
return ret;
--
2.55.0.897.gb25b4bd76c-goog
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 4/6] platform/x86: x86-android-tablets: add Crystal Cove GPIO swnode support
2026-08-30 11:15 [PATCH 0/6] platform/x86: x86-android-tablets: fix Arizona and Crystal Cove GPIO lookups Dmitry Torokhov
` (2 preceding siblings ...)
2026-08-30 11:15 ` [PATCH 3/6] platform/x86: x86-android-tablets: pass node group to gpio_secondary_fwnode_init() Dmitry Torokhov
@ 2026-08-30 11:15 ` Dmitry Torokhov
2026-08-30 11:15 ` [PATCH 5/6] platform/x86: x86-android-tablets: drop redundant swnode group on YT3 Dmitry Torokhov
` (5 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2026-08-30 11:15 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen, Andy Shevchenko,
Bartosz Golaszewski, Linus Walleij, Rafael J. Wysocki
Cc: platform-driver-x86, linux-kernel
The crystalcove_gpiochip_node was created when gpiolib supported
matching a software node name against the GPIO chip label. Later,
gpiolib replaced name matching with firmware node identity mapping, and
support for dynamically attaching software nodes to ACPI GPIO chips as
secondary firmware nodes was added for Baytrail and Cherryview, but
Crystal Cove ("INT33FD:00") was omitted. Consequently, lookups on the
unattached Crystal Cove software node fail.
Add support for attaching crystalcove_gpiochip_node to the INT33FD:00
ACPI device as a secondary firmware node, and enable it on Lenovo Yoga
Tab 2 models.
Fixes: 611fd6cfe139 ("gpio: swnode: remove deprecated lookup mechanism")
Assisted-by: LLM
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/platform/x86/x86-android-tablets/core.c | 17 +++++++++++++++++
drivers/platform/x86/x86-android-tablets/lenovo.c | 6 ++----
.../x86/x86-android-tablets/x86-android-tablets.h | 2 ++
3 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/x86-android-tablets/core.c b/drivers/platform/x86/x86-android-tablets/core.c
index 45673bfc0b7b..b028af1c9942 100644
--- a/drivers/platform/x86/x86-android-tablets/core.c
+++ b/drivers/platform/x86/x86-android-tablets/core.c
@@ -361,6 +361,15 @@ static const struct software_node *cherryview_gpiochip_node_group[] = {
NULL
};
+const struct software_node crystalcove_gpiochip_node = {
+ .name = "INT33FD:00",
+};
+
+static const struct software_node *crystalcove_gpiochip_node_group[] = {
+ &crystalcove_gpiochip_node,
+ NULL
+};
+
static void gpio_secondary_unset(void *data)
{
struct device *dev = data;
@@ -491,6 +500,14 @@ static __init int x86_android_tablet_probe(struct platform_device *pdev)
return ret;
}
+ if (dev_info->has_crystalcove) {
+ ret = gpio_secondary_fwnode_init(&pdev->dev, crystalcove_gpiochip_node_group);
+ if (ret) {
+ x86_android_tablet_remove(pdev);
+ return ret;
+ }
+ }
+
ret = software_node_register_node_group(dev_info->swnode_group);
if (ret) {
x86_android_tablet_remove(pdev);
diff --git a/drivers/platform/x86/x86-android-tablets/lenovo.c b/drivers/platform/x86/x86-android-tablets/lenovo.c
index c34f62bdf8f9..54068a0f4633 100644
--- a/drivers/platform/x86/x86-android-tablets/lenovo.c
+++ b/drivers/platform/x86/x86-android-tablets/lenovo.c
@@ -61,9 +61,6 @@ static struct lp855x_platform_data lenovo_lp8557_reg_only_pdata = {
.initial_brightness = 128,
};
-static const struct software_node crystalcove_gpiochip_node = {
- .name = "gpio_crystalcove",
-};
/* Lenovo Yoga Book X90F / X90L's Android factory image has everything hardcoded */
@@ -431,7 +428,6 @@ static const struct software_node lenovo_yoga_tab2_830_1050_wm5102 = {
};
static const struct software_node *lenovo_yoga_tab2_830_1050_swnodes[] = {
- &crystalcove_gpiochip_node,
&lenovo_yoga_tab2_830_1050_wm5102,
&generic_lipo_hv_4v35_battery_node,
NULL
@@ -454,6 +450,7 @@ const struct x86_dev_info lenovo_yoga_tab2_830_1050_info __initconst = {
.gpio_button_swnodes = lenovo_yoga_tab2_830_1050_lid_swnodes,
.swnode_group = lenovo_yoga_tab2_830_1050_swnodes,
.modules = lenovo_yoga_tab2_modules,
+ .has_crystalcove = true,
.gpiochip_type = X86_GPIOCHIP_BAYTRAIL,
.init = lenovo_yoga_tab2_830_1050_init,
.exit = lenovo_yoga_tab2_830_1050_exit,
@@ -799,6 +796,7 @@ const struct x86_dev_info lenovo_yoga_tab2_1380_info __initconst = {
.gpio_button_swnodes = lenovo_yoga_tab2_830_1050_lid_swnodes,
.swnode_group = lenovo_yoga_tab2_830_1050_swnodes,
.modules = lenovo_yoga_tab2_modules,
+ .has_crystalcove = true,
.gpiochip_type = X86_GPIOCHIP_BAYTRAIL,
.init = lenovo_yoga_tab2_1380_init,
.exit = lenovo_yoga_tab2_830_1050_exit,
diff --git a/drivers/platform/x86/x86-android-tablets/x86-android-tablets.h b/drivers/platform/x86/x86-android-tablets/x86-android-tablets.h
index c756961ae5fd..6e6534f8fa6c 100644
--- a/drivers/platform/x86/x86-android-tablets/x86-android-tablets.h
+++ b/drivers/platform/x86/x86-android-tablets/x86-android-tablets.h
@@ -96,6 +96,7 @@ struct x86_dev_info {
int (*init)(struct device *dev);
void (*exit)(void);
bool use_pci;
+ bool has_crystalcove;
enum x86_gpiochip_type gpiochip_type;
};
@@ -107,6 +108,7 @@ int x86_acpi_irq_helper_get(const struct x86_acpi_irq_data *data);
/* Software nodes representing GPIO chips used by various tablets */
extern const struct software_node baytrail_gpiochip_nodes[];
extern const struct software_node cherryview_gpiochip_nodes[];
+extern const struct software_node crystalcove_gpiochip_node;
/*
* Extern declarations of x86_dev_info structs so there can be a single
--
2.55.0.897.gb25b4bd76c-goog
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 5/6] platform/x86: x86-android-tablets: drop redundant swnode group on YT3
2026-08-30 11:15 [PATCH 0/6] platform/x86: x86-android-tablets: fix Arizona and Crystal Cove GPIO lookups Dmitry Torokhov
` (3 preceding siblings ...)
2026-08-30 11:15 ` [PATCH 4/6] platform/x86: x86-android-tablets: add Crystal Cove GPIO swnode support Dmitry Torokhov
@ 2026-08-30 11:15 ` Dmitry Torokhov
2026-08-30 11:15 ` [PATCH 6/6] platform/x86: x86-android-tablets: use shared battery swnode group on Yoga Tab 2 Dmitry Torokhov
` (4 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2026-08-30 11:15 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen, Andy Shevchenko,
Bartosz Golaszewski, Linus Walleij, Rafael J. Wysocki
Cc: platform-driver-x86, linux-kernel
The WM5102 codec software node lenovo_yt3_wm5102 is assigned to the
board info swnode pointer in lenovo_yt3_spi_devs. When spi_new_device()
instantiates the SPI device, device_add_software_node() automatically
registers the software node.
Therefore, explicitly registering lenovo_yt3_swnodes via
software_node_register_node_group() and listing it in .swnode_group is
redundant. Drop the unused node group and registration.
Assisted-by: LLM
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/platform/x86/x86-android-tablets/lenovo.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/platform/x86/x86-android-tablets/lenovo.c b/drivers/platform/x86/x86-android-tablets/lenovo.c
index 54068a0f4633..cd8cee1f4aed 100644
--- a/drivers/platform/x86/x86-android-tablets/lenovo.c
+++ b/drivers/platform/x86/x86-android-tablets/lenovo.c
@@ -997,10 +997,6 @@ static const struct software_node lenovo_yt3_wm5102 = {
.name = "wm5102",
};
-static const struct software_node *lenovo_yt3_swnodes[] = {
- &lenovo_yt3_wm5102,
- NULL
-};
static const struct x86_spi_dev_info lenovo_yt3_spi_devs[] __initconst = {
{
@@ -1068,7 +1064,6 @@ const struct x86_dev_info lenovo_yt3_info __initconst = {
.i2c_client_count = ARRAY_SIZE(lenovo_yt3_i2c_clients),
.spi_dev_info = lenovo_yt3_spi_devs,
.spi_dev_count = ARRAY_SIZE(lenovo_yt3_spi_devs),
- .swnode_group = lenovo_yt3_swnodes,
.modules = lenovo_yt3_modules,
.gpiochip_type = X86_GPIOCHIP_CHERRYVIEW,
.init = lenovo_yt3_init,
--
2.55.0.897.gb25b4bd76c-goog
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH 6/6] platform/x86: x86-android-tablets: use shared battery swnode group on Yoga Tab 2
2026-08-30 11:15 [PATCH 0/6] platform/x86: x86-android-tablets: fix Arizona and Crystal Cove GPIO lookups Dmitry Torokhov
` (4 preceding siblings ...)
2026-08-30 11:15 ` [PATCH 5/6] platform/x86: x86-android-tablets: drop redundant swnode group on YT3 Dmitry Torokhov
@ 2026-08-30 11:15 ` Dmitry Torokhov
2026-08-31 8:45 ` [PATCH 0/6] platform/x86: x86-android-tablets: fix Arizona and Crystal Cove GPIO lookups Linus Walleij
` (3 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Dmitry Torokhov @ 2026-08-30 11:15 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen, Andy Shevchenko,
Bartosz Golaszewski, Linus Walleij, Rafael J. Wysocki
Cc: platform-driver-x86, linux-kernel
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>
---
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
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH 0/6] platform/x86: x86-android-tablets: fix Arizona and Crystal Cove GPIO lookups
2026-08-30 11:15 [PATCH 0/6] platform/x86: x86-android-tablets: fix Arizona and Crystal Cove GPIO lookups Dmitry Torokhov
` (5 preceding siblings ...)
2026-08-30 11:15 ` [PATCH 6/6] platform/x86: x86-android-tablets: use shared battery swnode group on Yoga Tab 2 Dmitry Torokhov
@ 2026-08-31 8:45 ` Linus Walleij
2026-08-31 9:11 ` Andy Shevchenko
` (2 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Linus Walleij @ 2026-08-31 8:45 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Hans de Goede, Ilpo Järvinen, Andy Shevchenko,
Bartosz Golaszewski, Rafael J. Wysocki, platform-driver-x86,
linux-kernel
On Sun, Aug 30, 2026 at 1:15 PM Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> When gpiolib dropped name-against-label matching in favor of firmware node
> identity mapping, lookups referencing unattached software nodes (such as
> arizona and gpio_crystalcove in x86-android-tablets) stopped working.
Ooops.
The series look good to me.
Reviewed-by: Linus Walleij <linusw@kernel.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH 0/6] platform/x86: x86-android-tablets: fix Arizona and Crystal Cove GPIO lookups
2026-08-30 11:15 [PATCH 0/6] platform/x86: x86-android-tablets: fix Arizona and Crystal Cove GPIO lookups Dmitry Torokhov
` (6 preceding siblings ...)
2026-08-31 8:45 ` [PATCH 0/6] platform/x86: x86-android-tablets: fix Arizona and Crystal Cove GPIO lookups Linus Walleij
@ 2026-08-31 9:11 ` Andy Shevchenko
2026-08-31 9:42 ` Hans de Goede
2026-08-31 20:17 ` Hans de Goede
9 siblings, 0 replies; 16+ messages in thread
From: Andy Shevchenko @ 2026-08-31 9:11 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Hans de Goede, Ilpo Järvinen, Andy Shevchenko,
Bartosz Golaszewski, Linus Walleij, Rafael J. Wysocki,
platform-driver-x86, linux-kernel
On Sun, Aug 30, 2026 at 04:15:04AM -0700, Dmitry Torokhov wrote:
> When gpiolib dropped name-against-label matching in favor of firmware node
> identity mapping, lookups referencing unattached software nodes (such as
> arizona and gpio_crystalcove in x86-android-tablets) stopped working.
>
> This series fixes the lookups and cleans up redundant software node
> registrations on Lenovo tablets:
> - Point Arizona GPIO property entries directly to the codec device software
> node, which is attached to the parent device.
> - Hold a device reference in gpio_secondary_fwnode_init() to ensure safety
> during devres action teardown.
> - Generalize gpio_secondary_fwnode_init() to accept a node group argument
> and use it to attach crystalcove_gpiochip_node as a secondary firmware
> node to INT33FD:00 on Lenovo Yoga Tab 2 models.
> - Drop redundant swnode group registrations on Lenovo Yoga Tab 3 and
> Yoga Tab 2 models where codec software nodes are already registered when
> attached to their respective devices.
Nice series, thanks!
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH 0/6] platform/x86: x86-android-tablets: fix Arizona and Crystal Cove GPIO lookups
2026-08-30 11:15 [PATCH 0/6] platform/x86: x86-android-tablets: fix Arizona and Crystal Cove GPIO lookups Dmitry Torokhov
` (7 preceding siblings ...)
2026-08-31 9:11 ` Andy Shevchenko
@ 2026-08-31 9:42 ` Hans de Goede
2026-08-31 12:47 ` Dmitry Torokhov
2026-08-31 20:17 ` Hans de Goede
9 siblings, 1 reply; 16+ messages in thread
From: Hans de Goede @ 2026-08-31 9:42 UTC (permalink / raw)
To: Dmitry Torokhov, Ilpo Järvinen, Andy Shevchenko,
Bartosz Golaszewski, Linus Walleij, Rafael J. Wysocki
Cc: platform-driver-x86, linux-kernel
Hi,
On 30-Aug-26 1:15 PM, Dmitry Torokhov wrote:
> When gpiolib dropped name-against-label matching in favor of firmware node
> identity mapping, lookups referencing unattached software nodes (such as
> arizona and gpio_crystalcove in x86-android-tablets) stopped working.
>
> This series fixes the lookups and cleans up redundant software node
> registrations on Lenovo tablets:
> - Point Arizona GPIO property entries directly to the codec device software
> node, which is attached to the parent device.
> - Hold a device reference in gpio_secondary_fwnode_init() to ensure safety
> during devres action teardown.
> - Generalize gpio_secondary_fwnode_init() to accept a node group argument
> and use it to attach crystalcove_gpiochip_node as a secondary firmware
> node to INT33FD:00 on Lenovo Yoga Tab 2 models.
> - Drop redundant swnode group registrations on Lenovo Yoga Tab 3 and
> Yoga Tab 2 models where codec software nodes are already registered when
> attached to their respective devices.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
So I've given this a test on a Yoga Tablet 3 (yt3) tablet yesterday and
there everything works.
Then I also tested this on a Lenovo Yoga Tablet 2 1380 since the YT3 does
not cover the crystal_cove GPIO case and there things do not work.
It seems that trying to get the crystal_cove GPIOs indefinetely returns
-EPROBE_DEFER. I'll try to debug thus further this evening.
Regards,
Hans
> ---
> Dmitry Torokhov (6):
> platform/x86: x86-android-tablets: fix Arizona GPIO swnode references
> platform/x86: x86-android-tablets: hold device reference for secondary fwnode teardown
> platform/x86: x86-android-tablets: pass node group to gpio_secondary_fwnode_init()
> platform/x86: x86-android-tablets: add Crystal Cove GPIO swnode support
> platform/x86: x86-android-tablets: drop redundant swnode group on YT3
> platform/x86: x86-android-tablets: use shared battery swnode group on Yoga Tab 2
>
> drivers/platform/x86/x86-android-tablets/core.c | 35 +++++++++++++++-----
> drivers/platform/x86/x86-android-tablets/lenovo.c | 37 +++++++---------------
> .../x86/x86-android-tablets/x86-android-tablets.h | 2 ++
> 3 files changed, 40 insertions(+), 34 deletions(-)
> ---
> base-commit: f82a5da2f04960df9fb57489992d03dd5e64ec6f
> change-id: 20260829-x86-android-lenovo-swnode-785f4e165eb2
>
> Thanks.
>
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH 0/6] platform/x86: x86-android-tablets: fix Arizona and Crystal Cove GPIO lookups
2026-08-31 9:42 ` Hans de Goede
@ 2026-08-31 12:47 ` Dmitry Torokhov
2026-08-31 20:20 ` Hans de Goede
0 siblings, 1 reply; 16+ messages in thread
From: Dmitry Torokhov @ 2026-08-31 12:47 UTC (permalink / raw)
To: Hans de Goede
Cc: Ilpo Järvinen, Andy Shevchenko, Bartosz Golaszewski,
Linus Walleij, Rafael J. Wysocki, platform-driver-x86,
linux-kernel
On Mon, Aug 31, 2026 at 11:42:06AM +0200, Hans de Goede wrote:
> Hi,
>
> On 30-Aug-26 1:15 PM, Dmitry Torokhov wrote:
> > When gpiolib dropped name-against-label matching in favor of firmware node
> > identity mapping, lookups referencing unattached software nodes (such as
> > arizona and gpio_crystalcove in x86-android-tablets) stopped working.
> >
> > This series fixes the lookups and cleans up redundant software node
> > registrations on Lenovo tablets:
> > - Point Arizona GPIO property entries directly to the codec device software
> > node, which is attached to the parent device.
> > - Hold a device reference in gpio_secondary_fwnode_init() to ensure safety
> > during devres action teardown.
> > - Generalize gpio_secondary_fwnode_init() to accept a node group argument
> > and use it to attach crystalcove_gpiochip_node as a secondary firmware
> > node to INT33FD:00 on Lenovo Yoga Tab 2 models.
> > - Drop redundant swnode group registrations on Lenovo Yoga Tab 3 and
> > Yoga Tab 2 models where codec software nodes are already registered when
> > attached to their respective devices.
> >
> > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>
> So I've given this a test on a Yoga Tablet 3 (yt3) tablet yesterday and
> there everything works.
>
> Then I also tested this on a Lenovo Yoga Tablet 2 1380 since the YT3 does
> not cover the crystal_cove GPIO case and there things do not work.
>
> It seems that trying to get the crystal_cove GPIOs indefinetely returns
> -EPROBE_DEFER. I'll try to debug thus further this evening.
I wonder if the patch below will help.
Thanks.
--
Dmitry
From 9376af2b6a9c91cd6a05969b583f40d451050988 Mon Sep 17 00:00:00 2001
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: Mon, 31 Aug 2026 04:59:24 -0700
Subject: [PATCH] gpio: crystalcove: add missing MODULE_ALIAS()
The crystalcove GPIO driver lacks a MODULE_ALIAS() to allow it to be
auto-loaded. This results in consumers indefinitely deferring their
probe with -EPROBE_DEFER (waiting for the GPIO controller to appear)
when it's compiled as a module, as it will never be loaded.
Fix this by adding the missing platform alias.
Fixes: 104fb1d5153c ("gpio: Add support for Intel Crystal Cove PMIC")
Assisted-by: LLM
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/gpio/gpio-crystalcove.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpio/gpio-crystalcove.c b/drivers/gpio/gpio-crystalcove.c
index 0fb5c06d0886..ab7fab5b9754 100644
--- a/drivers/gpio/gpio-crystalcove.c
+++ b/drivers/gpio/gpio-crystalcove.c
@@ -396,3 +396,4 @@ module_platform_driver(crystalcove_gpio_driver);
MODULE_AUTHOR("Yang, Bin <bin.yang@intel.com>");
MODULE_DESCRIPTION("Intel Crystal Cove GPIO Driver");
MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:crystal_cove_gpio");
--
2.55.0.897.gb25b4bd76c-goog
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH 0/6] platform/x86: x86-android-tablets: fix Arizona and Crystal Cove GPIO lookups
2026-08-31 12:47 ` Dmitry Torokhov
@ 2026-08-31 20:20 ` Hans de Goede
2026-08-31 20:21 ` Hans de Goede
0 siblings, 1 reply; 16+ messages in thread
From: Hans de Goede @ 2026-08-31 20:20 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Ilpo Järvinen, Andy Shevchenko, Bartosz Golaszewski,
Linus Walleij, Rafael J. Wysocki, platform-driver-x86,
linux-kernel
Hi Dmitry.
On 31-Aug-26 14:47, Dmitry Torokhov wrote:
> On Mon, Aug 31, 2026 at 11:42:06AM +0200, Hans de Goede wrote:
>> Hi,
>>
>> On 30-Aug-26 1:15 PM, Dmitry Torokhov wrote:
>>> When gpiolib dropped name-against-label matching in favor of firmware node
>>> identity mapping, lookups referencing unattached software nodes (such as
>>> arizona and gpio_crystalcove in x86-android-tablets) stopped working.
>>>
>>> This series fixes the lookups and cleans up redundant software node
>>> registrations on Lenovo tablets:
>>> - Point Arizona GPIO property entries directly to the codec device software
>>> node, which is attached to the parent device.
>>> - Hold a device reference in gpio_secondary_fwnode_init() to ensure safety
>>> during devres action teardown.
>>> - Generalize gpio_secondary_fwnode_init() to accept a node group argument
>>> and use it to attach crystalcove_gpiochip_node as a secondary firmware
>>> node to INT33FD:00 on Lenovo Yoga Tab 2 models.
>>> - Drop redundant swnode group registrations on Lenovo Yoga Tab 3 and
>>> Yoga Tab 2 models where codec software nodes are already registered when
>>> attached to their respective devices.
>>>
>>> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>>
>> So I've given this a test on a Yoga Tablet 3 (yt3) tablet yesterday and
>> there everything works.
>>
>> Then I also tested this on a Lenovo Yoga Tablet 2 1380 since the YT3 does
>> not cover the crystal_cove GPIO case and there things do not work.
>>
>> It seems that trying to get the crystal_cove GPIOs indefinetely returns
>> -EPROBE_DEFER. I'll try to debug thus further this evening.
>
> I wonder if the patch below will help.
No that does not fix things since I've crystalcove_gpio builtin (1).
Still a good catch though and worthwhile to send out as a standalone
patch.
Regards,
Hans
1) The i915 driver uses CrystalCove PMIC GPIOs for panel on/off on
some drivers and it cannot handle EPROBE_DEFER gracefully at the point
where it is requesting the GPIOs. So this driver must be builtin for
the i915 driver to work correctly on relevant models.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/6] platform/x86: x86-android-tablets: fix Arizona and Crystal Cove GPIO lookups
2026-08-31 20:20 ` Hans de Goede
@ 2026-08-31 20:21 ` Hans de Goede
0 siblings, 0 replies; 16+ messages in thread
From: Hans de Goede @ 2026-08-31 20:21 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Ilpo Järvinen, Andy Shevchenko, Bartosz Golaszewski,
Linus Walleij, Rafael J. Wysocki, platform-driver-x86,
linux-kernel
On 31-Aug-26 22:20, Hans de Goede wrote:
> Hi Dmitry.
>
> On 31-Aug-26 14:47, Dmitry Torokhov wrote:
>> On Mon, Aug 31, 2026 at 11:42:06AM +0200, Hans de Goede wrote:
>>> Hi,
>>>
>>> On 30-Aug-26 1:15 PM, Dmitry Torokhov wrote:
>>>> When gpiolib dropped name-against-label matching in favor of firmware node
>>>> identity mapping, lookups referencing unattached software nodes (such as
>>>> arizona and gpio_crystalcove in x86-android-tablets) stopped working.
>>>>
>>>> This series fixes the lookups and cleans up redundant software node
>>>> registrations on Lenovo tablets:
>>>> - Point Arizona GPIO property entries directly to the codec device software
>>>> node, which is attached to the parent device.
>>>> - Hold a device reference in gpio_secondary_fwnode_init() to ensure safety
>>>> during devres action teardown.
>>>> - Generalize gpio_secondary_fwnode_init() to accept a node group argument
>>>> and use it to attach crystalcove_gpiochip_node as a secondary firmware
>>>> node to INT33FD:00 on Lenovo Yoga Tab 2 models.
>>>> - Drop redundant swnode group registrations on Lenovo Yoga Tab 3 and
>>>> Yoga Tab 2 models where codec software nodes are already registered when
>>>> attached to their respective devices.
>>>>
>>>> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>>>
>>> So I've given this a test on a Yoga Tablet 3 (yt3) tablet yesterday and
>>> there everything works.
>>>
>>> Then I also tested this on a Lenovo Yoga Tablet 2 1380 since the YT3 does
>>> not cover the crystal_cove GPIO case and there things do not work.
>>>
>>> It seems that trying to get the crystal_cove GPIOs indefinetely returns
>>> -EPROBE_DEFER. I'll try to debug thus further this evening.
>>
>> I wonder if the patch below will help.
>
> No that does not fix things since I've crystalcove_gpio builtin (1).
p.s. should have added:
I did find the real problem and posted a follow up patch to be applied
on top of this series fixing things:
https://lore.kernel.org/platform-driver-x86/20260831201157.36397-1-johannes.goede@oss.qualcomm.com/
Regards,
Hans
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/6] platform/x86: x86-android-tablets: fix Arizona and Crystal Cove GPIO lookups
2026-08-30 11:15 [PATCH 0/6] platform/x86: x86-android-tablets: fix Arizona and Crystal Cove GPIO lookups Dmitry Torokhov
` (8 preceding siblings ...)
2026-08-31 9:42 ` Hans de Goede
@ 2026-08-31 20:17 ` Hans de Goede
2026-08-31 20:37 ` Dmitry Torokhov
9 siblings, 1 reply; 16+ messages in thread
From: Hans de Goede @ 2026-08-31 20:17 UTC (permalink / raw)
To: Dmitry Torokhov, Ilpo Järvinen, Andy Shevchenko,
Bartosz Golaszewski, Linus Walleij, Rafael J. Wysocki
Cc: platform-driver-x86, linux-kernel
Hi,
On 30-Aug-26 13:15, Dmitry Torokhov wrote:
> When gpiolib dropped name-against-label matching in favor of firmware node
> identity mapping, lookups referencing unattached software nodes (such as
> arizona and gpio_crystalcove in x86-android-tablets) stopped working.
>
> This series fixes the lookups and cleans up redundant software node
> registrations on Lenovo tablets:
> - Point Arizona GPIO property entries directly to the codec device software
> node, which is attached to the parent device.
> - Hold a device reference in gpio_secondary_fwnode_init() to ensure safety
> during devres action teardown.
> - Generalize gpio_secondary_fwnode_init() to accept a node group argument
> and use it to attach crystalcove_gpiochip_node as a secondary firmware
> node to INT33FD:00 on Lenovo Yoga Tab 2 models.
> - Drop redundant swnode group registrations on Lenovo Yoga Tab 3 and
> Yoga Tab 2 models where codec software nodes are already registered when
> attached to their respective devices.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
My initial testing report of success on the Yoga Tab 3 was a false negative
caused by me still running the older kernel.
There was a generic bug in the new gpio_secondary_fwnode_init() helper
which was causing all GPIO lookups for PROPERTY_ENTRY_GPIO() properties
in the x86-android-tablets code to fail.
I've send out a patch fixing this:
https://lore.kernel.org/platform-driver-x86/20260831201157.36397-1-johannes.goede@oss.qualcomm.com/
Note that patch applies *on top of* this series.
With that patch everything works fine on both a "Yoga Tablet 2 1380" as
well as on a "Yoga Tab 3" which covers all types of GPIOS (BYT SoC,
CHT SoC, CrystalCove PMIC, Arizona codec) used in the x86-android-tablets
code.
And the changes from this series look good to me too:
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>
Regards,
Hans
> ---
> Dmitry Torokhov (6):
> platform/x86: x86-android-tablets: fix Arizona GPIO swnode references
> platform/x86: x86-android-tablets: hold device reference for secondary fwnode teardown
> platform/x86: x86-android-tablets: pass node group to gpio_secondary_fwnode_init()
> platform/x86: x86-android-tablets: add Crystal Cove GPIO swnode support
> platform/x86: x86-android-tablets: drop redundant swnode group on YT3
> platform/x86: x86-android-tablets: use shared battery swnode group on Yoga Tab 2
>
> drivers/platform/x86/x86-android-tablets/core.c | 35 +++++++++++++++-----
> drivers/platform/x86/x86-android-tablets/lenovo.c | 37 +++++++---------------
> .../x86/x86-android-tablets/x86-android-tablets.h | 2 ++
> 3 files changed, 40 insertions(+), 34 deletions(-)
> ---
> base-commit: f82a5da2f04960df9fb57489992d03dd5e64ec6f
> change-id: 20260829-x86-android-lenovo-swnode-785f4e165eb2
>
> Thanks.
>
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH 0/6] platform/x86: x86-android-tablets: fix Arizona and Crystal Cove GPIO lookups
2026-08-31 20:17 ` Hans de Goede
@ 2026-08-31 20:37 ` Dmitry Torokhov
2026-09-01 13:11 ` Hans de Goede
0 siblings, 1 reply; 16+ messages in thread
From: Dmitry Torokhov @ 2026-08-31 20:37 UTC (permalink / raw)
To: Hans de Goede
Cc: Ilpo Järvinen, Andy Shevchenko, Bartosz Golaszewski,
Linus Walleij, Rafael J. Wysocki, platform-driver-x86,
linux-kernel
On Mon, Aug 31, 2026 at 10:17:41PM +0200, Hans de Goede wrote:
> Hi,
>
> On 30-Aug-26 13:15, Dmitry Torokhov wrote:
> > When gpiolib dropped name-against-label matching in favor of firmware node
> > identity mapping, lookups referencing unattached software nodes (such as
> > arizona and gpio_crystalcove in x86-android-tablets) stopped working.
> >
> > This series fixes the lookups and cleans up redundant software node
> > registrations on Lenovo tablets:
> > - Point Arizona GPIO property entries directly to the codec device software
> > node, which is attached to the parent device.
> > - Hold a device reference in gpio_secondary_fwnode_init() to ensure safety
> > during devres action teardown.
> > - Generalize gpio_secondary_fwnode_init() to accept a node group argument
> > and use it to attach crystalcove_gpiochip_node as a secondary firmware
> > node to INT33FD:00 on Lenovo Yoga Tab 2 models.
> > - Drop redundant swnode group registrations on Lenovo Yoga Tab 3 and
> > Yoga Tab 2 models where codec software nodes are already registered when
> > attached to their respective devices.
> >
> > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>
> My initial testing report of success on the Yoga Tab 3 was a false negative
> caused by me still running the older kernel.
>
> There was a generic bug in the new gpio_secondary_fwnode_init() helper
> which was causing all GPIO lookups for PROPERTY_ENTRY_GPIO() properties
> in the x86-android-tablets code to fail.
>
> I've send out a patch fixing this:
>
> https://lore.kernel.org/platform-driver-x86/20260831201157.36397-1-johannes.goede@oss.qualcomm.com/
>
> Note that patch applies *on top of* this series.
>
> With that patch everything works fine on both a "Yoga Tablet 2 1380" as
> well as on a "Yoga Tab 3" which covers all types of GPIOS (BYT SoC,
> CHT SoC, CrystalCove PMIC, Arizona codec) used in the x86-android-tablets
> code.
>
> And the changes from this series look good to me too:
>
> 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>
Will you apply everything yourself or will you let Ilpo do this?
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/6] platform/x86: x86-android-tablets: fix Arizona and Crystal Cove GPIO lookups
2026-08-31 20:37 ` Dmitry Torokhov
@ 2026-09-01 13:11 ` Hans de Goede
0 siblings, 0 replies; 16+ messages in thread
From: Hans de Goede @ 2026-09-01 13:11 UTC (permalink / raw)
To: Dmitry Torokhov, Ilpo Järvinen
Cc: Andy Shevchenko, Bartosz Golaszewski, Linus Walleij,
Rafael J. Wysocki, platform-driver-x86, linux-kernel
Hi,
On 31-Aug-26 22:37, Dmitry Torokhov wrote:
> On Mon, Aug 31, 2026 at 10:17:41PM +0200, Hans de Goede wrote:
>> Hi,
>>
>> On 30-Aug-26 13:15, Dmitry Torokhov wrote:
>>> When gpiolib dropped name-against-label matching in favor of firmware node
>>> identity mapping, lookups referencing unattached software nodes (such as
>>> arizona and gpio_crystalcove in x86-android-tablets) stopped working.
>>>
>>> This series fixes the lookups and cleans up redundant software node
>>> registrations on Lenovo tablets:
>>> - Point Arizona GPIO property entries directly to the codec device software
>>> node, which is attached to the parent device.
>>> - Hold a device reference in gpio_secondary_fwnode_init() to ensure safety
>>> during devres action teardown.
>>> - Generalize gpio_secondary_fwnode_init() to accept a node group argument
>>> and use it to attach crystalcove_gpiochip_node as a secondary firmware
>>> node to INT33FD:00 on Lenovo Yoga Tab 2 models.
>>> - Drop redundant swnode group registrations on Lenovo Yoga Tab 3 and
>>> Yoga Tab 2 models where codec software nodes are already registered when
>>> attached to their respective devices.
>>>
>>> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>>
>> My initial testing report of success on the Yoga Tab 3 was a false negative
>> caused by me still running the older kernel.
>>
>> There was a generic bug in the new gpio_secondary_fwnode_init() helper
>> which was causing all GPIO lookups for PROPERTY_ENTRY_GPIO() properties
>> in the x86-android-tablets code to fail.
>>
>> I've send out a patch fixing this:
>>
>> https://lore.kernel.org/platform-driver-x86/20260831201157.36397-1-johannes.goede@oss.qualcomm.com/
>>
>> Note that patch applies *on top of* this series.
>>
>> With that patch everything works fine on both a "Yoga Tablet 2 1380" as
>> well as on a "Yoga Tab 3" which covers all types of GPIOS (BYT SoC,
>> CHT SoC, CrystalCove PMIC, Arizona codec) used in the x86-android-tablets
>> code.
>>
>> And the changes from this series look good to me too:
>>
>> 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>
>
> Will you apply everything yourself or will you let Ilpo do this?
Ilpo is doing 99% of the pdx86 maintainer work these days, with me just
hanging around as backup.
So I think it is easier if Ilpo just applies this series himself.
Ilpo: Note these are fixes (+ related cleanups) for a regression
in 7.3-rc1 so these need to go to the fixes branch.
And fixing the regression then requires this fix to be added on top:
https://lore.kernel.org/platform-driver-x86/20260831201157.36397-1-johannes.goede@oss.qualcomm.com/
Note the order matters (to avoid conflicts) first this series,
them my fix on top.
Regards,
Hans
^ permalink raw reply [flat|nested] 16+ messages in thread