mirror of
https://github.com/torvalds/linux.git
synced 2026-09-13 23:50:02 +02:00
platform/x86: x86-android-tablets: fix Arizona GPIO swnode references
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: 611fd6cfe1 ("gpio: swnode: remove deprecated lookup mechanism")
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-1-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:
parent
9ffed84a24
commit
355b6558dd
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user