From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD93E407594; Fri, 27 Feb 2026 13:55:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200535; cv=none; b=IY0guqLRP2P1oTLf2zwvvEk45ce49ytxrCQzhtxaZFuc4luLyM4gfKaLz7fuKKkWo1tTm8W7vMQz4xfNBaweskd/BEhnHPpTQzhfhb5vfOhi91086OuiFyaub9xvcBRTHJgSvsfoKurhPF8w+G9k8LKNGRTNkJP0oXqJ8dEYQZQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200535; c=relaxed/simple; bh=FArXeehyZTW3N0bt5Bcb/H3S/Bs4a13KfFNQGV+ZYDY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gLXgJnfjIYMJOXH95FxgJbBxoF6AdlOOdR/LALLdoivHKP3kk30z09Ie/MSl6xGjXmFX7QxHRhnEkL+O29fwn3qRKJG07Alj2pin633UfHBQwNqOgZB6f4eTRecsBcl8zZza2gpith59e7vNVOmW5cgbiSA0iQco+/FzgEV+Usg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=mS2uj6p5; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="mS2uj6p5" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 5A7214E419CC; Fri, 27 Feb 2026 13:55:29 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 27B0B5FE74; Fri, 27 Feb 2026 13:55:29 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 4679A1036945B; Fri, 27 Feb 2026 14:55:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200526; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=udl87NYHrbG5beYr+sj6tRLtpueqBaBik+Z+B4KV8SY=; b=mS2uj6p5sYMMyvUUXk2OszAlkp+DSyu8AI+ZOxi9FVwinjWzl3MPnaeyZ4sN1L3HnD7NM+ gOrgnq8gKKsRclQHl41MG+6fLrXIlEv0O9tHyr0gfHqybYYL+mTPtSZga/j1LAI3a/es1M IiTvHcXjx5jzlvRUnT659GkBv5cKyn/sU0w4j1bWsrttfbn4D0nm9T9T8Vo/WOjM/ThvYl HlBcncSCXaUPdTfOYdU1XQq2KjkVq7aajYdz9m0RsHYL7vkxGW53nbiXd2Ey+Yw4x1bxnl xyi4PMC+rJzJ7gw8QiV30Kr0wRTpzZ+Cxzlkeu4xCA4rgoeU+tBHaXnfIDYIjA== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni , Saravana Kannan Subject: [PATCH v5 01/28] Revert "treewide: Fix probing of devices in DT overlays" Date: Fri, 27 Feb 2026 14:53:58 +0100 Message-ID: <20260227135428.783983-2-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" From: Saravana Kannan This reverts commit 1a50d9403fb90cbe4dea0ec9fd0351d2ecbd8924. While the commit fixed fw_devlink overlay handling for one case, it broke it for another case. So revert it and redo the fix in a separate patch. Fixes: 1a50d9403fb9 ("treewide: Fix probing of devices in DT overlays") Reported-by: Herve Codina Closes: https://lore.kernel.org/lkml/CAMuHMdXEnSD4rRJ-o90x4OprUacN_rJgyo8x6= =3D9F9rZ+-KzjOg@mail.gmail.com/ Closes: https://lore.kernel.org/all/20240221095137.616d2aaa@bootlin.com/ Closes: https://lore.kernel.org/lkml/20240312151835.29ef62a0@bootlin.com/ Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/lkml/20240411235623.1260061-2-saravanak@googl= e.com/ Signed-off-by: Herve Codina Acked-by: Mark Brown --- drivers/bus/imx-weim.c | 6 ------ drivers/i2c/i2c-core-of.c | 5 ----- drivers/of/dynamic.c | 1 - drivers/of/platform.c | 5 ----- drivers/spi/spi.c | 5 ----- 5 files changed, 22 deletions(-) diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c index 83d623d97f5f..87070155b057 100644 --- a/drivers/bus/imx-weim.c +++ b/drivers/bus/imx-weim.c @@ -327,12 +327,6 @@ static int of_weim_notify(struct notifier_block *nb, u= nsigned long action, "Failed to setup timing for '%pOF'\n", rd->dn); =20 if (!of_node_check_flag(rd->dn, OF_POPULATED)) { - /* - * Clear the flag before adding the device so that - * fw_devlink doesn't skip adding consumers to this - * device. - */ - rd->dn->fwnode.flags &=3D ~FWNODE_FLAG_NOT_DEVICE; if (!of_platform_device_create(rd->dn, NULL, &pdev->dev)) { dev_err(&pdev->dev, "Failed to create child device '%pOF'\n", diff --git a/drivers/i2c/i2c-core-of.c b/drivers/i2c/i2c-core-of.c index eb7fb202355f..30b48a428c0b 100644 --- a/drivers/i2c/i2c-core-of.c +++ b/drivers/i2c/i2c-core-of.c @@ -176,11 +176,6 @@ static int of_i2c_notify(struct notifier_block *nb, un= signed long action, return NOTIFY_OK; } =20 - /* - * Clear the flag before adding the device so that fw_devlink - * doesn't skip adding consumers to this device. - */ - rd->dn->fwnode.flags &=3D ~FWNODE_FLAG_NOT_DEVICE; client =3D of_i2c_register_device(adap, rd->dn); if (IS_ERR(client)) { dev_err(&adap->dev, "failed to create client for '%pOF'\n", diff --git a/drivers/of/dynamic.c b/drivers/of/dynamic.c index 1a06175def37..aa450425ec1e 100644 --- a/drivers/of/dynamic.c +++ b/drivers/of/dynamic.c @@ -225,7 +225,6 @@ static void __of_attach_node(struct device_node *np) np->sibling =3D np->parent->child; np->parent->child =3D np; of_node_clear_flag(np, OF_DETACHED); - np->fwnode.flags |=3D FWNODE_FLAG_NOT_DEVICE; =20 raw_spin_unlock_irqrestore(&devtree_lock, flags); =20 diff --git a/drivers/of/platform.c b/drivers/of/platform.c index ba591fbceb56..2037c0b3880d 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -738,11 +738,6 @@ static int of_platform_notify(struct notifier_block *n= b, if (of_node_check_flag(rd->dn, OF_POPULATED)) return NOTIFY_OK; =20 - /* - * Clear the flag before adding the device so that fw_devlink - * doesn't skip adding consumers to this device. - */ - rd->dn->fwnode.flags &=3D ~FWNODE_FLAG_NOT_DEVICE; /* pdev_parent may be NULL when no bus platform device */ pdev_parent =3D of_find_device_by_node(parent); pdev =3D of_platform_device_create(rd->dn, NULL, diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 61f7bde8c7fb..749d306ce1cc 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -4934,11 +4934,6 @@ static int of_spi_notify(struct notifier_block *nb, = unsigned long action, return NOTIFY_OK; } =20 - /* - * Clear the flag before adding the device so that fw_devlink - * doesn't skip adding consumers to this device. - */ - rd->dn->fwnode.flags &=3D ~FWNODE_FLAG_NOT_DEVICE; spi =3D of_register_spi_device(ctlr, rd->dn); put_device(&ctlr->dev); =20 --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C115E2F0C74; Fri, 27 Feb 2026 13:55:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200548; cv=none; b=KTvYmR4sjfqjW0aZyTQqoo6YdTcAi4qTOFzRXD64khhasihDcYZk4QaAfdABHOLa0A+s5t1KSLviDAh0NHbj41BSiUgSrmdGd3cORcAle1ERQFkiuGrbFCxolqGXksf/rbkyrAr1W57CvsC8B27iYxMQeIiyxVDGzDqQWpOb7gw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200548; c=relaxed/simple; bh=rQ9386ik5scHejhWHKAfmM4chPis7l6ygutP7HAioiQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=N4KQdofahk6E+48mUxgtqNT2YpIM8SUudjrrGgHuu0V8IjJqzBbarMBzG7c0QucSTdrRHuIoLxfuzo2pLwKkLTc68kJ8Lg9JQR3YAeH8kKFBRrXhO7qOT4YgrZAeKbl8tN9bsxncuoMfChlnm2PvKRR2oHlWk3QmoQD2/con3P8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=A+7yObo/; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="A+7yObo/" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 6B0A44E419C1; Fri, 27 Feb 2026 13:55:45 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 41D305FE46; Fri, 27 Feb 2026 13:55:45 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id F1D8D10369460; Fri, 27 Feb 2026 14:55:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200542; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=O69AwOTjqvKfpSQSdAHMm1uc7do/5N9kZQR7OTjD6w0=; b=A+7yObo/IcLfXq3wKm4nu0U/uQjzcpjZMe9GeG3VIfoKJn6vei94ilHLqflWh6nGNt+OV0 GxvNLNl7kRjPB7BDztNQ8QVwy+SXAGcuEF7qdEnwdchVyOFZnjzauhWWYsCXPCPL7+R1p5 NqFTewx0oHZ9mY3PI3cayyXUl2yV+9+Tr/At+NCzt2BE0MhUld5uPq6xQpkqeSpkJYhz/b EJeWpldoPq9ylHM+ZcMewH0wcf4NAeTeUcoNBj59nKdfJHNdBJpBhEkUXBIawZ97krQtfe uxO0of42kKZlcJlXX1kdyhGTLQHJnttqw2E8vorEo44gIGs2mGadVMHEpztLLA== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni , Saravana Kannan Subject: [PATCH v5 02/28] driver core: Rename get_dev_from_fwnode() wrapper to get_device_from_fwnode() Date: Fri, 27 Feb 2026 14:53:59 +0100 Message-ID: <20260227135428.783983-3-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" get_dev_from_fwnode() calls get_device() and so it acquires a reference on the device returned. In order to be more obvious that this wrapper is a get_device() variant, rename it to get_device_from_fwnode(). Suggested-by: Mark Brown Link: https://lore.kernel.org/lkml/CAGETcx97QjnjVR8Z5g0ndLHpK96hLd4aYSV=3Di= EkKPNbNOccYmA@mail.gmail.com/ Signed-off-by: Herve Codina Reviewed-by: Andy Shevchenko Reviewed-by: Saravana Kannan Reviewed-by: Luca Ceresoli Acked-by: Ulf Hansson --- drivers/base/core.c | 18 +++++++++--------- drivers/pmdomain/core.c | 4 ++-- include/linux/device.h | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index 791f9e444df8..33c0ff2b162d 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -1888,7 +1888,7 @@ static bool fwnode_init_without_drv(struct fwnode_han= dle *fwnode) if (!(fwnode->flags & FWNODE_FLAG_INITIALIZED)) return false; =20 - dev =3D get_dev_from_fwnode(fwnode); + dev =3D get_device_from_fwnode(fwnode); ret =3D !dev || dev->links.status =3D=3D DL_DEV_NO_DRIVER; put_device(dev); =20 @@ -1957,7 +1957,7 @@ static struct device *fwnode_get_next_parent_dev(cons= t struct fwnode_handle *fwn struct device *dev; =20 fwnode_for_each_parent_node(fwnode, parent) { - dev =3D get_dev_from_fwnode(parent); + dev =3D get_device_from_fwnode(parent); if (dev) { fwnode_handle_put(parent); return dev; @@ -2013,8 +2013,8 @@ static bool __fw_devlink_relax_cycles(struct fwnode_h= andle *con_handle, goto out; } =20 - sup_dev =3D get_dev_from_fwnode(sup_handle); - con_dev =3D get_dev_from_fwnode(con_handle); + sup_dev =3D get_device_from_fwnode(sup_handle); + con_dev =3D get_device_from_fwnode(con_handle); /* * If sup_dev is bound to a driver and @con hasn't started binding to a * driver, sup_dev can't be a consumer of @con. So, no need to check @@ -2153,7 +2153,7 @@ static int fw_devlink_create_devlink(struct device *c= on, if (sup_handle->flags & FWNODE_FLAG_NOT_DEVICE) sup_dev =3D fwnode_get_next_parent_dev(sup_handle); else - sup_dev =3D get_dev_from_fwnode(sup_handle); + sup_dev =3D get_device_from_fwnode(sup_handle); =20 if (sup_dev) { /* @@ -2222,7 +2222,7 @@ static void __fw_devlink_link_to_consumers(struct dev= ice *dev) bool own_link =3D true; int ret; =20 - con_dev =3D get_dev_from_fwnode(link->consumer); + con_dev =3D get_device_from_fwnode(link->consumer); /* * If consumer device is not available yet, make a "proxy" * SYNC_STATE_ONLY link from the consumer's parent device to @@ -5278,7 +5278,7 @@ void device_set_node(struct device *dev, struct fwnod= e_handle *fwnode) EXPORT_SYMBOL_GPL(device_set_node); =20 /** - * get_dev_from_fwnode - Obtain a reference count of the struct device the + * get_device_from_fwnode - Obtain a reference count of the struct device = the * struct fwnode_handle is associated with. * @fwnode: The pointer to the struct fwnode_handle to obtain the struct d= evice * reference count of. @@ -5296,11 +5296,11 @@ EXPORT_SYMBOL_GPL(device_set_node); * This is possible since struct fwnode_handle has its own reference count= and * hence can out-live the struct device it is associated with. */ -struct device *get_dev_from_fwnode(struct fwnode_handle *fwnode) +struct device *get_device_from_fwnode(struct fwnode_handle *fwnode) { return get_device((fwnode)->dev); } -EXPORT_SYMBOL_GPL(get_dev_from_fwnode); +EXPORT_SYMBOL_GPL(get_device_from_fwnode); =20 int device_match_name(struct device *dev, const void *name) { diff --git a/drivers/pmdomain/core.c b/drivers/pmdomain/core.c index 52ea84e548ff..444008234b05 100644 --- a/drivers/pmdomain/core.c +++ b/drivers/pmdomain/core.c @@ -2686,7 +2686,7 @@ int of_genpd_add_provider_simple(struct device_node *= np, genpd->dev.of_node =3D np; =20 fwnode =3D of_fwnode_handle(np); - dev =3D get_dev_from_fwnode(fwnode); + dev =3D get_device_from_fwnode(fwnode); if (!dev && !genpd_is_no_sync_state(genpd)) { genpd->sync_state =3D GENPD_SYNC_STATE_SIMPLE; device_set_node(&genpd->dev, fwnode); @@ -2761,7 +2761,7 @@ int of_genpd_add_provider_onecell(struct device_node = *np, data->xlate =3D genpd_xlate_onecell; =20 fwnode =3D of_fwnode_handle(np); - dev =3D get_dev_from_fwnode(fwnode); + dev =3D get_device_from_fwnode(fwnode); if (!dev) sync_state =3D true; else diff --git a/include/linux/device.h b/include/linux/device.h index 0be95294b6e6..fd08e55e05de 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -1071,7 +1071,7 @@ void device_set_node(struct device *dev, struct fwnod= e_handle *fwnode); int device_add_of_node(struct device *dev, struct device_node *of_node); void device_remove_of_node(struct device *dev); void device_set_of_node_from_dev(struct device *dev, const struct device *= dev2); -struct device *get_dev_from_fwnode(struct fwnode_handle *fwnode); +struct device *get_device_from_fwnode(struct fwnode_handle *fwnode); =20 static inline struct device_node *dev_of_node(struct device *dev) { --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D496437AA8C; Fri, 27 Feb 2026 13:56:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200567; cv=none; b=E+sVu97oTkLd2YNHa12CKB2JUog9WXEgP4UH8oOCz0qJpZQNmlIRqkqkwWCeI79BclACyuRgvogyckgbzRcDc1Bwyl0zfnY4RJgbkE4BMtyfwroZJo7S4ByoZSz263bFXaliHDYpEHV+fkRSB0jdCgdFPl0Q+lP9ZMKnscCViB0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200567; c=relaxed/simple; bh=1kygrbXUsqSO1d3ZHAqdW4exnjhCOZ9Y+sVh/vzJnRw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=f6Axo3xZBetYXZDcNTc//9NJP1QcrKxSQSFoujHofX/GqrRQf3EsRA2JG6akYzG1R/wSjMshl4rhA4Avc5ggvp0YfTkCwsK52r5HubSRoFJJC4nNMcSJW+dqp+BkWczUdZqJ2NZDq557ddXlWMG/mpfSw5JgJ8aK2jsfR8Rg+cc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=iyP8z6HD; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="iyP8z6HD" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 0B3D2C406A8; Fri, 27 Feb 2026 13:56:20 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 2260E5FE74; Fri, 27 Feb 2026 13:56:04 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 04D601036944D; Fri, 27 Feb 2026 14:55:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200560; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=p8S6F0Dk9q5kajBdN8kx3cUo1tUMilH2AT+6IGS4VpQ=; b=iyP8z6HDeIsvkWzAQrvdnL5H+6IUqA+ItMh2qwFUJBVqLbbMooJqIdQisstvQfVrJIduyp tfy4aBhf32/EuW1ERKqTLsjp8bBd3yzRZNdIFVH6YXIcpvG279YuX5ReRR23ZBO0dLXO8q 5yN2sWIIDnAKRmkAAZf3ImSgIyyc4mfR8xbONYY/lv2+mC1awZHFvsBNM42K8IaKrJrb0B xE9KYJPp/cWGTlQbSsZJI1W3CZb04y5R/84PmjTPlgzvnCWPaAVVwvf0mrk54Jr677XpI9 d6Gju/kcqvNtZ0LaislTf/QbH/4VbQW0rZGajATtyvrfbvL+VXfKsiM1yPPwbA== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni , Saravana Kannan Subject: [PATCH v5 03/28] of: dynamic: Fix overlayed devices not probing because of fw_devlink Date: Fri, 27 Feb 2026 14:54:00 +0100 Message-ID: <20260227135428.783983-4-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" From: Saravana Kannan When an overlay is applied, if the target device has already probed successfully and bound to a device, then some of the fw_devlink logic that ran when the device was probed needs to be rerun. This allows newly created dangling consumers of the overlayed device tree nodes to be moved to become consumers of the target device. Fixes: 1a50d9403fb9 ("treewide: Fix probing of devices in DT overlays") Reported-by: Herve Codina Closes: https://lore.kernel.org/lkml/CAMuHMdXEnSD4rRJ-o90x4OprUacN_rJgyo8x6= =3D9F9rZ+-KzjOg@mail.gmail.com/ Closes: https://lore.kernel.org/all/20240221095137.616d2aaa@bootlin.com/ Closes: https://lore.kernel.org/lkml/20240312151835.29ef62a0@bootlin.com/ Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/lkml/20240411235623.1260061-3-saravanak@googl= e.com/ [Herve: Rebase on top of recent kernel and use get_device_from_fwnode()] [Herve: Add the call to driver_deferred_probe_trigger()] Signed-off-by: Herve Codina Tested-by: Geert Uytterhoeven Tested-by: Kalle Niemi --- drivers/base/core.c | 83 +++++++++++++++++++++++++++++++++++++----- drivers/of/overlay.c | 15 ++++++++ include/linux/fwnode.h | 1 + 3 files changed, 90 insertions(+), 9 deletions(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index 33c0ff2b162d..726e4af9b1a6 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -235,6 +235,79 @@ static void __fw_devlink_pickup_dangling_consumers(str= uct fwnode_handle *fwnode, __fw_devlink_pickup_dangling_consumers(child, new_sup); } =20 +static void fw_devlink_pickup_dangling_consumers(struct device *dev) +{ + struct fwnode_handle *child; + + guard(mutex)(&fwnode_link_lock); + + fwnode_for_each_available_child_node(dev->fwnode, child) + __fw_devlink_pickup_dangling_consumers(child, dev->fwnode); + __fw_devlink_link_to_consumers(dev); +} + +/** + * fw_devlink_refresh_fwnode - Recheck the tree under this firmware node + * @fwnode: The fwnode under which the fwnode tree has changed + * + * This function is mainly meant to adjust the supplier/consumer dependenc= ies + * after a fwnode tree overlay has occurred. + */ +void fw_devlink_refresh_fwnode(struct fwnode_handle *fwnode) +{ + struct device *dev; + + /* + * Find the closest ancestor fwnode that has been converted to a device + * that can bind to a driver (bus device). + */ + fwnode_handle_get(fwnode); + do { + if (fwnode->flags & FWNODE_FLAG_NOT_DEVICE) + continue; + + dev =3D get_device_from_fwnode(fwnode); + if (!dev) + continue; + + if (dev->bus) + break; + + put_device(dev); + } while ((fwnode =3D fwnode_get_next_parent(fwnode))); + + /* + * If none of the ancestor fwnodes have (yet) been converted to a device + * that can bind to a driver, there's nothing to fix up. + */ + if (!fwnode) + return; + + WARN(device_is_bound(dev) && dev->links.status !=3D DL_DEV_DRIVER_BOUND, + "Don't multithread overlaying and probing the same device!\n"); + + /* + * If the device has already bound to a driver, then we need to redo + * some of the work that was done after the device was bound to a + * driver. If the device hasn't bound to a driver, running thing too + * soon would incorrectly pick up consumers that it shouldn't. + */ + if (dev->links.status =3D=3D DL_DEV_DRIVER_BOUND) { + fw_devlink_pickup_dangling_consumers(dev); + /* + * Some of dangling consumers could have been put previously in + * the deferred probe list due to the unavailability of their + * suppliers. Those consumers have been picked up and some of + * their suppliers links have been update. Time to re-try their + * probe sequence. + */ + driver_deferred_probe_trigger(); + } + + put_device(dev); + fwnode_handle_put(fwnode); +} + static DEFINE_MUTEX(device_links_lock); DEFINE_STATIC_SRCU(device_links_srcu); =20 @@ -1312,16 +1385,8 @@ void device_links_driver_bound(struct device *dev) * child firmware node. */ if (dev->fwnode && dev->fwnode->dev =3D=3D dev) { - struct fwnode_handle *child; - fwnode_links_purge_suppliers(dev->fwnode); - - guard(mutex)(&fwnode_link_lock); - - fwnode_for_each_available_child_node(dev->fwnode, child) - __fw_devlink_pickup_dangling_consumers(child, - dev->fwnode); - __fw_devlink_link_to_consumers(dev); + fw_devlink_pickup_dangling_consumers(dev); } device_remove_file(dev, &dev_attr_waiting_for_supplier); =20 diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index c1c5686fc7b1..4e45f3414c2c 100644 --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -185,6 +185,15 @@ static int overlay_notify(struct overlay_changeset *ov= cs, return 0; } =20 +static void overlay_fw_devlink_refresh(struct overlay_changeset *ovcs) +{ + for (int i =3D 0; i < ovcs->count; i++) { + struct device_node *np =3D ovcs->fragments[i].target; + + fw_devlink_refresh_fwnode(of_fwnode_handle(np)); + } +} + /* * The values of properties in the "/__symbols__" node are paths in * the ovcs->overlay_root. When duplicating the properties, the paths @@ -951,6 +960,12 @@ static int of_overlay_apply(struct overlay_changeset *= ovcs, pr_err("overlay apply changeset entry notify error %d\n", ret); /* notify failure is not fatal, continue */ =20 + /* + * Needs to happen after changeset notify to give the listeners a chance + * to finish creating all the devices they need to create. + */ + overlay_fw_devlink_refresh(ovcs); + ret_tmp =3D overlay_notify(ovcs, OF_OVERLAY_POST_APPLY); if (ret_tmp) if (!ret) diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h index 097be89487bf..a921ca2fe940 100644 --- a/include/linux/fwnode.h +++ b/include/linux/fwnode.h @@ -228,6 +228,7 @@ int fwnode_link_add(struct fwnode_handle *con, struct f= wnode_handle *sup, u8 flags); void fwnode_links_purge(struct fwnode_handle *fwnode); void fw_devlink_purge_absent_suppliers(struct fwnode_handle *fwnode); +void fw_devlink_refresh_fwnode(struct fwnode_handle *fwnode); bool fw_devlink_is_strict(void); =20 #endif --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 320C42F0C74; Fri, 27 Feb 2026 13:56:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200585; cv=none; b=CqXWhJBUo/EGX2KFcZS1xaVH1o1rEgNNNiA8B5WwSr9w5M8W+QgC45/e0IW1NlFCfNXoxzmfmLsv65gBnq2F9P8sHSMqICxvN6UU9nn974Az2tDqR9a0FheZOs3OBBwU3a2hIhY2vJdFTKTwaHxpa/DWHyDg+7mJ7Clhr2qGTGk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200585; c=relaxed/simple; bh=vdcGl9UVOyw3rOY+LXIvMiHZW1W3dKWxxU54+28xi1Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=E6jmcjc8925gPWS2TPcWva+bA1LYqg/jxS+5h2P55AdGsJcjpUsKNb77yKdeVVeR1cLIyE1bmHwmQAqACHKnxA+0upEYw6MhRkIRN927ieUhTjjE+nA9j4cjGNUu6sTe74sx3CVP/fByGTJp8G8iCmNXDSLd1Z2U9x0Uj1PXaQc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=XoAeLgSd; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="XoAeLgSd" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 0FE001A1A66; Fri, 27 Feb 2026 13:56:23 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id D20EF5FE74; Fri, 27 Feb 2026 13:56:22 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 3FDAC1036945B; Fri, 27 Feb 2026 14:56:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200579; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=qcU1HDjTOUBSyFgKUJwkfsWd8ZxPtYRiY6uk6xR04uc=; b=XoAeLgSdxut1/ctuzPaL66b6NjHn0rXRadWC2KkZeVQtwbB1PAwIoVpvNFt9ZSRz74InYc THqwtcKOLuL9FdOHKigY+Q9bfu6Sn0omI3EwKrxXrwHXGFY5E0FMzlUxuBxX+rydwunROX oVEsq/FRmQkioMdan3XDIZakj2I89jnnyxjzvTBXqjzRW7ox1kJtmpS+nk19xVYTkGmDsk ENgsGo6YTLQsheWzSkbxHKyyMXVbDJ/lXwnp9Z0HtiG4N4/hK5c7fX1YKYghiI3Qk25wxN aInZgqn5wXjOPZafumuzabWiAAraP5AQBV3QgR+/V1q6oQkeIWky5ScF9SHEvQ== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni , Saravana Kannan Subject: [PATCH v5 04/28] driver core: Avoid warning when removing a device while its supplier is unbinding Date: Fri, 27 Feb 2026 14:54:01 +0100 Message-ID: <20260227135428.783983-5-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" During driver removal, the following warning can appear: WARNING: CPU: 1 PID: 139 at drivers/base/core.c:1497 __device_links_no_d= river+0xcc/0xfc ... Call trace: __device_links_no_driver+0xcc/0xfc (P) device_links_driver_cleanup+0xa8/0xf0 device_release_driver_internal+0x208/0x23c device_links_unbind_consumers+0xe0/0x108 device_release_driver_internal+0xec/0x23c device_links_unbind_consumers+0xe0/0x108 device_release_driver_internal+0xec/0x23c device_links_unbind_consumers+0xe0/0x108 device_release_driver_internal+0xec/0x23c driver_detach+0xa0/0x12c bus_remove_driver+0x6c/0xbc driver_unregister+0x30/0x60 pci_unregister_driver+0x20/0x9c lan966x_pci_driver_exit+0x18/0xa90 [lan966x_pci] This warning is triggered when a consumer is removed because the links status of its supplier is not DL_DEV_DRIVER_BOUND and the link flag DL_FLAG_SYNC_STATE_ONLY is not set. The topology in terms of consumers/suppliers used was the following (consumer ---> supplier): i2c -----------> OIC ----> PCI device | ^ | | +---> pinctrl ---+ When the PCI device is removed, the OIC (interrupt controller) has to be removed. In order to remove the OIC, pinctrl and i2c need to be removed and to remove pinctrl, i2c need to be removed. The removal order is: 1) i2c 2) pinctrl 3) OIC 4) PCI device In details, the removal sequence is the following (with 0000:01:00.0 the PCI device): driver_detach: call device_release_driver_internal(0000:01:00.0)... device_links_busy(0000:01:00.0): links->status =3D DL_DEV_UNBINDING device_links_unbind_consumers(0000:01:00.0): 0000:01:00.0--oic link->status =3D DL_STATE_SUPPLIER_UNBIND call device_release_driver_internal(oic)... device_links_busy(oic): links->status =3D DL_DEV_UNBINDING device_links_unbind_consumers(oic): oic--pinctrl link->status =3D DL_STATE_SUPPLIER_UNBIND call device_release_driver_internal(pinctrl)... device_links_busy(pinctrl): links->status =3D DL_DEV_UNBINDING device_links_unbind_consumers(pinctrl): pinctrl--i2c link->status =3D DL_STATE_SUPPLIER_UNBIND call device_release_driver_internal(i2c)... device_links_busy(i2c): links->status =3D DL_DEV_UNBINDING __device_links_no_driver(i2c)... pinctrl--i2c link->status is DL_STATE_SUPPLIER_UNBIND oic--i2c link->status is DL_STATE_ACTIVE oic--i2c link->supplier->links.status is DL_DEV_UNBINDING The warning is triggered by the i2c removal because the OIC (supplier) links status is not DL_DEV_DRIVER_BOUND. Its links status is indeed set to DL_DEV_UNBINDING. It is perfectly legit to have the links status set to DL_DEV_UNBINDING in that case. Indeed we had started to unbind the OIC which triggered the consumer unbinding and didn't finish yet when the i2c is unbound. Avoid the warning when the supplier links status is set to DL_DEV_UNBINDING and thus support this removal sequence without any warnings. Signed-off-by: Herve Codina Reviewed-by: Rafael J. Wysocki Reviewed-by: Saravana Kannan --- drivers/base/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index 726e4af9b1a6..a290bc8d2845 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -1500,7 +1500,8 @@ static void __device_links_no_driver(struct device *d= ev) if (link->supplier->links.status =3D=3D DL_DEV_DRIVER_BOUND) { WRITE_ONCE(link->status, DL_STATE_AVAILABLE); } else { - WARN_ON(!device_link_test(link, DL_FLAG_SYNC_STATE_ONLY)); + WARN_ON(link->supplier->links.status !=3D DL_DEV_UNBINDING && + !device_link_test(link, DL_FLAG_SYNC_STATE_ONLY)); WRITE_ONCE(link->status, DL_STATE_DORMANT); } } --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 03C163A9D83; Fri, 27 Feb 2026 13:56:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200600; cv=none; b=m6fkTiw9C9naBqMThkKau8gJ/7BdmXg3Kq5DKeUkcPrSCECeIZMj7Yrm8F4fuq1fiCEmCW/x556fuOYxcxw9Lk6cKMQ63ajkBQU57UwVFHRcpuTS8C12KNVhyTFMQs7gr7XpNHbplniyPakMTdoL3m7z4uUOfizyjrvrFiVihcE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200600; c=relaxed/simple; bh=pNJgxM3Q6VrVRA/ImgG+f9Z478N2c1kQ4rp0wHmYr48=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kQ0n3zukUXJSsOccjKDDQTjttYXJdad91yxFlOE4fNNPoVsUDkxffPsRlSZ+rdU+rLmGAYMUVhcZbwWFG8C1uoNKiQ0PBbkI4w1+uEYgmDZf6dMW+8OzQVY4YPt0aurig/aEPiKqXVj1S7/hD/HXCvJGluFNM+QF0lb5YNpuMZk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=jGhZx8PJ; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="jGhZx8PJ" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id BCBBF4E419C1; Fri, 27 Feb 2026 13:56:37 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 92D175FE46; Fri, 27 Feb 2026 13:56:37 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 6D7FC10369455; Fri, 27 Feb 2026 14:56:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200594; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=giDCWLXbUuWTQUHzm6UggcAb1bsu7moyMro/sWeCGf0=; b=jGhZx8PJrbMwPBPMfvny+dV7ub/XVihGdmVg60FmlgEwQsT3McZeT4TF6df3IeOcVRQmjv ZcNWgCT9LDE7ZsLwW6LdCLBR08RKbJh4riD5zyleqo6JCuuBgLxIsboxhJ17u1ef914dnm Qyez2m03CDDTvGmEuRFP9+BdpVsCyfDKS7qHEldb+8FiRgzlmKUWnA2ZvhwW2gIbX7QBOd /V3C2XY/hjjywgf+9G0xLJlfEJiqnoL34bfkISVVQHLc21E1tS5ypuhtG/sTnakXswvyus a5Iw8WPBPrXEBIKEG2zce+Dh1WgN+virvi5wUB/v5QqaeM70Cza5ZFz4ktuQfw== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 05/28] bus: simple-pm-bus: Remove child devices when the bus is unbound Date: Fri, 27 Feb 2026 14:54:02 +0100 Message-ID: <20260227135428.783983-6-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" During its probe, the simple-pm-bus driver (simple-pm-bus compatible variant) populates its child devices but it doesn't touch them during its removal. This leads to bus child devices present and bound to drivers whereas the bus itself is unbound. Be consistent and remove child devices when the bus itself is unbound. Signed-off-by: Herve Codina --- drivers/bus/simple-pm-bus.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/bus/simple-pm-bus.c b/drivers/bus/simple-pm-bus.c index 3f00d953fb9a..9ebd588ea24f 100644 --- a/drivers/bus/simple-pm-bus.c +++ b/drivers/bus/simple-pm-bus.c @@ -83,6 +83,9 @@ static void simple_pm_bus_remove(struct platform_device *= pdev) =20 dev_dbg(&pdev->dev, "%s\n", __func__); =20 + if (pdev->dev.of_node) + of_platform_depopulate(&pdev->dev); + pm_runtime_disable(&pdev->dev); } =20 --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD3583806A5; Fri, 27 Feb 2026 13:56:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200615; cv=none; b=L6RFHRohAZREeDhWejFhaWJ1EjZnragnUqNqgr8h41ipaWCgebKXdocUl+QKnlli25C8vB9vWi0Jn0I6PS5DZof3EUaLM7mRt7tNPzBqLW5xi7q4iQiGzQCzFKC5pZC9TyREbwqNx/YmVccErFzwuvWsWV7KcT8E1CYLjaiGSOM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200615; c=relaxed/simple; bh=9WU6CnPwYf69YjJfs3q6iXeTR9MJC3N/+SMlykGezC0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Jh080yadx7I2xFQjjdaXcapeD4nLD5gdIN6E5eEYazFk18oxa9vOP3hboT5ySx7gqLjzir9IXllIoPz0j06zqvAvH6A8k94DPGhJaiQYnAAiZ/hSM9ZifwIRq8EGOlN6VLpuO127LSDR69VSS4KeJOyBXtmXaGMG1TojH8pmkcY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=0JBpspHM; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="0JBpspHM" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 899B34E419C1; Fri, 27 Feb 2026 13:56:53 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 5B19A5FE74; Fri, 27 Feb 2026 13:56:53 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 69CDD10369456; Fri, 27 Feb 2026 14:56:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200610; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=FQEG+gi+2Owsvm5H07y7paCS6UXV8c60jAbpve0hKl8=; b=0JBpspHMu+EgKDJbwJiUHOPHVEueeo51oODn+mnhbUs9QrLsvI6wmJGkxw/oFRB0shTiDE R+kQoE7fZvbclcrecP4FxZtIk3lh4cvaEBiTl5tY3YMJeM5zsSNbTFS5aUILH/ZrmKKPUr YxdzEDQUqBZB8jqXA4FDORenwJVzqzVUrru9uEPKHQGttMYXEJZ9ot1GEpOJiT34oJz+Zh b2lGDG7vIDqpfab496Q9ueOvPSLxn26UyxOzp1gFHl6EWweMnwGoL6KDfEAXpcAifvMvhk 6wu+h11KavTl1pCm+t+x1OrwW21ZPHRMqgD8/fHaTtMljyWxuHus4+IqDZhNWw== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 06/28] bus: simple-pm-bus: Populate child nodes at probe Date: Fri, 27 Feb 2026 14:54:03 +0100 Message-ID: <20260227135428.783983-7-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" The simple-pm-bus driver handles several simple busses. When it is used with busses other than a compatible "simple-pm-bus", it doesn't populate its child devices during its probe. This confuses fw_devlink and results in wrong or missing devlinks. Once a driver is bound to a device and the probe() has been called, device_links_driver_bound() is called. This function performs operation based on the following assumption: If a child firmware node of the bound device is not added as a device, it will never be added. Among operations done on fw_devlinks of those "never be added" devices, device_links_driver_bound() changes their supplier. With devices attached to a simple-bus compatible device, this change leads to wrong devlinks where supplier of devices points to the device parent (i.e. simple-bus compatible device) instead of the device itself (i.e. simple-bus child). When the device attached to the simple-bus is removed, because devlinks are not correct, its consumers are not removed first. In order to have correct devlinks created, make the simple-pm-bus driver compliant with the devlink assumption and create its child devices during its probe. Signed-off-by: Herve Codina --- drivers/bus/simple-pm-bus.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/bus/simple-pm-bus.c b/drivers/bus/simple-pm-bus.c index 9ebd588ea24f..30628958c923 100644 --- a/drivers/bus/simple-pm-bus.c +++ b/drivers/bus/simple-pm-bus.c @@ -42,14 +42,15 @@ static int simple_pm_bus_probe(struct platform_device *= pdev) match =3D of_match_device(dev->driver->of_match_table, dev); /* * These are transparent bus devices (not simple-pm-bus matches) that - * have their child nodes populated automatically. So, don't need to - * do anything more. We only match with the device if this driver is - * the most specific match because we don't want to incorrectly bind to - * a device that has a more specific driver. + * need to have their child nodes populated. So, don't need to do + * anything more except populate child nodes during this probe(). We + * only match with the device if this driver is the most specific match + * because we don't want to incorrectly bind to a device that has a more + * specific driver. */ if (match && match->data) { if (of_property_match_string(np, "compatible", match->compatible) =3D=3D= 0) - return 0; + goto populate; else return -ENODEV; } @@ -64,13 +65,14 @@ static int simple_pm_bus_probe(struct platform_device *= pdev) =20 dev_set_drvdata(&pdev->dev, bus); =20 - dev_dbg(&pdev->dev, "%s\n", __func__); - pm_runtime_enable(&pdev->dev); =20 +populate: if (np) of_platform_populate(np, NULL, lookup, &pdev->dev); =20 + dev_dbg(&pdev->dev, "%s\n", __func__); + return 0; } =20 @@ -78,7 +80,7 @@ static void simple_pm_bus_remove(struct platform_device *= pdev) { const void *data =3D of_device_get_match_data(&pdev->dev); =20 - if (pdev->driver_override || data) + if (pdev->driver_override) return; =20 dev_dbg(&pdev->dev, "%s\n", __func__); @@ -86,7 +88,8 @@ static void simple_pm_bus_remove(struct platform_device *= pdev) if (pdev->dev.of_node) of_platform_depopulate(&pdev->dev); =20 - pm_runtime_disable(&pdev->dev); + if (!data) + pm_runtime_disable(&pdev->dev); } =20 static int simple_pm_bus_runtime_suspend(struct device *dev) --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D79B83D3D18; Fri, 27 Feb 2026 13:57:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200634; cv=none; b=ibl3B68bQSTit+t5fzZFFaJOqKyNbY3aVgmREe9qZsyjtqimMosv4nzd3tc/UsbxaR58HtttGxAXvEsxx2MzfX/3q9Vygzkf0ulrR55RPmgtyp0S3YJ2p7VsSdUT5DecmbATT0H8v6fV34eQhWiYtISaNx1B41w9rmz6Q8EIXMo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200634; c=relaxed/simple; bh=DemXEm0/7jPqDrRAPI2ny+O+6c7SOnzYnYssoNRbW6I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MF2s6VHFShHLbkg7knSBrV43PmqKus+gNAzsXfO0sQER8rJNYb1FkZ3ksBDoSVIfsXk5xh5WhxWM3kt8x1mZ1HvvrJJ2BcnAhkayG2P6rgbebG2TnWT4bijueysIau9zna3VpjABE6gkd6RwRJEcFc0jAlHsT6Y0jW4db2DSAfo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=mcUXSvYU; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="mcUXSvYU" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id A47301A118A; Fri, 27 Feb 2026 13:57:11 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 7A5B95FE46; Fri, 27 Feb 2026 13:57:11 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 754621036944D; Fri, 27 Feb 2026 14:56:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200628; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=09D8ciD6EX3li5458i+gRdBItReF2zPIbe1cyHSXFzo=; b=mcUXSvYUnjpneW3fWHyJbxchqrg2gTPck/1bjlu0JRihMGow1r6TpGfTHQpAq4CF33TQBd FZ1CItqOQ7t3fuk1XRJVEY0CfgxCoYmlKFs6ET8Rjfq6hN2S5vue7mFBdsuLyTMU2hylv5 Sw1LvbphCnr8LHEAE+8Hs/eU+pUUMVyHLyd39qAsXZxKJ2OOzw3RGk+J3ek7WGOWZ+2/QO yN4Q1wE762V8rD+C7OZjv9rQYWBV+0mwWo9BJ5IpGbYkOpGnQ8hL3y1IYs7aGQnkx1UIma JJqoMjGdrNOZLA0stFZugPLux6TPuOjsDBF8tpuf1Q7McRMH3hf/UfhM5fA3eQ== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 07/28] driver core: fw_devlink: Introduce fw_devlink_set_device() Date: Fri, 27 Feb 2026 14:54:04 +0100 Message-ID: <20260227135428.783983-8-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" Setting fwnode->dev is specific to fw_devlink. In order to avoid having a direct 'fwnode->dev =3D dev;' in several place in the kernel, introduce fw_devlink_set_device() helper to perform this operation. Signed-off-by: Herve Codina Reviewed-by: Andy Shevchenko Reviewed-by: Ulf Hansson Reviewed-by: Charles Keepax --- include/linux/fwnode.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h index a921ca2fe940..a1345e274125 100644 --- a/include/linux/fwnode.h +++ b/include/linux/fwnode.h @@ -231,4 +231,10 @@ void fw_devlink_purge_absent_suppliers(struct fwnode_h= andle *fwnode); void fw_devlink_refresh_fwnode(struct fwnode_handle *fwnode); bool fw_devlink_is_strict(void); =20 +static inline void fw_devlink_set_device(struct fwnode_handle *fwnode, + struct device *dev) +{ + fwnode->dev =3D dev; +} + #endif --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04475265621; Fri, 27 Feb 2026 13:57:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200653; cv=none; b=MzWj/R2pP6kNrWBSIPUc1p4khV0cJrfa80WqQCLkRHTQLUKLUsrxupnCcU/ZC0u7DOUndOZrcNb5GoOc1UK1KFuiZOJrsXSVY30OvYOezicmQHuXIqs1CSp2cPBFXpnhiFjE1npR0CFp8ELC7/TcOb/B/WmrgEYVIXKsRDq8ZFU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200653; c=relaxed/simple; bh=cjTs9Teo7h9jcgAtLf5zal+hTqCKlI8fBzAdsiIQ7PY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WR5TkvF7Pj5ipwdnlUutl5VmpOM61t6d8OgrxKfJq96Hmk0+6gyVGlK9BNkQEnCbZsZXlZhQEk3TI3Tf0oUlyRvg5zSccYltDA2kAlIAkFDgVyArYVtvhTTTKH+WRdkcAF+9meOKdteCUU4XGPup/Fn1Fs/xCkSMuYkHzgi0RVY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=wfttePbG; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="wfttePbG" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 68D044E41922; Fri, 27 Feb 2026 13:57:29 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 3DDE85FE74; Fri, 27 Feb 2026 13:57:29 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 5A84610369455; Fri, 27 Feb 2026 14:57:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200645; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=qSi45MAHHZxO1b8V/Yy/dsNXbhVRxpFDFOrJhmV0YL0=; b=wfttePbGMZnRtaettI5ju+ccNdECB0zUB96MetgSTzIuX7Il1NyzYdg/KvzF47JxhA3+4+ H1cLBwxY/ZMmXHyeKyf4gzYWoGd4QDou2/uFd+hzmzMrhSoDeg2SlGJHfwDNYbB6CclRu6 6feWg7oXwgxzKzrcGVHP7aufMjoA0MX5CkqxTtqAFmZ7M0k3oBMCIuzrK8M4I2B27H9wF3 RFcGJxx5pwfKfDk/j1BHaVT7dCxulAtAJfLo3k7BT6mwaHXCpEHEyQq7fmdbwihWrY5Wsl zB18vqbstZoZowoD33/XJkhK1zQjzz/GNikzrhgkHRvznG7VkNxoBYeKJKlDfQ== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 08/28] drivers: core: Use fw_devlink_set_device() Date: Fri, 27 Feb 2026 14:54:05 +0100 Message-ID: <20260227135428.783983-9-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" The code set directly fwnode->dev field. Use the dedicated fw_devlink_set_device() helper to perform this operation. Signed-off-by: Herve Codina Reviewed-by: Andy Shevchenko Reviewed-by: Ulf Hansson --- drivers/base/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index a290bc8d2845..3f3a909306d2 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -3748,7 +3748,7 @@ int device_add(struct device *dev) * device and the driver sync_state callback is called for this device. */ if (dev->fwnode && !dev->fwnode->dev) { - dev->fwnode->dev =3D dev; + fw_devlink_set_device(dev->fwnode, dev); fw_devlink_link_device(dev); } =20 @@ -3908,7 +3908,7 @@ void device_del(struct device *dev) device_unlock(dev); =20 if (dev->fwnode && dev->fwnode->dev =3D=3D dev) - dev->fwnode->dev =3D NULL; + fw_devlink_set_device(dev->fwnode, NULL); =20 /* Notify clients of device removal. This call must come * before dpm_sysfs_remove(). --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2984F265621; Fri, 27 Feb 2026 13:57:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200668; cv=none; b=Jqlz/irFKrbS6X1AjOk76XCitTVecQRzdsG4pcdusP31WN/A2Ly4mN4KX91bbX/jAO5H6NTCjuW50pYMDsisVt+mD1818Gc4n4MnTjKLMfP4QebTALMrM2Fs5dRky0pd8BoHK8DMSo2z5b22Hd/Oud45pk7AfNZOWfzhekKptC0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200668; c=relaxed/simple; bh=rXOUxEDV7eHxEIYWcWX2gadIAwende36HMpmxecb4yE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cI+0p2pqYAUO8amH9D4R5G7MvAJYQMYvMBOmRi3Sqe/DPdmUPTKBLpNsN+afkIwyY/qeELHbvuGnDFC2ghHaPJvptKIXrz+Lp3DuvwPXP196Cu8on3Bcada65tQ+KwEGKlVwsad4MPc/3sKZTyhF6sQcx+SwCy1mYrmkqYqbdUY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=EhhKSt1B; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="EhhKSt1B" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id C631F4E41922; Fri, 27 Feb 2026 13:57:45 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 998E65FE74; Fri, 27 Feb 2026 13:57:45 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 0BE6210369460; Fri, 27 Feb 2026 14:57:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200662; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=+jkimMRAMrv/prhaWdnbklrnWJGtivMQ59Bh3f+hqFo=; b=EhhKSt1BLp7fvrRybi9gQi4re2lUp8cvUZzh1xZxYWyDqepGCv8bQJSHNdmtVPugZdZb1c l/NoGqlUVGyeWcY/qm/+djeA3lBldUib2zyK9bMhvDeqDcZROdqEH7r68n7RbcBVUCqzw/ 25X0kfiq00ho3dz/kvDiVZtG70q6EkrsJ4bl0qRiVkTQFPo2HdcARtCbioFYBraYF0udiK ZrHOX3oiWxx+FpG/kFHqoLgGYaAU4P50i+kljhh5EXOt6hEj/EevOuUewDqsrSMoZu09Ur duJJLjuw6c5NnDwFh0LdbmVtwTfITgFbNHV0Gm9eDmTNrIXB/1ehmfnV4P2zbw== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 09/28] pinctrl: cs42l43: Use fw_devlink_set_device() Date: Fri, 27 Feb 2026 14:54:06 +0100 Message-ID: <20260227135428.783983-10-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" The code set directly fwnode->dev field. Use the dedicated fw_devlink_set_device() helper to perform this operation. Signed-off-by: Herve Codina Reviewed-by: Andy Shevchenko Acked-by: Linus Walleij Reviewed-by: Charles Keepax --- drivers/pinctrl/cirrus/pinctrl-cs42l43.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c b/drivers/pinctrl/cir= rus/pinctrl-cs42l43.c index a8f82104a384..a3dd8da15919 100644 --- a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c +++ b/drivers/pinctrl/cirrus/pinctrl-cs42l43.c @@ -579,7 +579,7 @@ static int cs42l43_pin_probe(struct platform_device *pd= ev) return ret; } if (!child->dev) - child->dev =3D priv->dev; + fw_devlink_set_device(child, priv->dev); fwnode =3D child; } } --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3DB4C36B040; Fri, 27 Feb 2026 13:58:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200685; cv=none; b=nN2uPSkVSGlGnfBMusKH8DRWI58yuf5OllZco0u6j9Q1DhP4mASJGxc/Ri89vm1hMZeWQn7TQDx8ZiUtmYWMUKbyuTQAj1UTbZ1m8R3yRFtg0eKxJg3y1NQmSQZVr0HvypT447kwyMWK8KITQeSusRvdx+lDSIHAckLFnXzaqQc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200685; c=relaxed/simple; bh=p4Z9jhLKqMzTN+l8MDS7e/16UN9t3KWZvn4J71Hwk0A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PNhsYjWyRG4pA37NYaKssYKU3P3jXPf2vch2cEL1rqr+35+Y90J/4iGyVeVHUiXD+3Xm5XEqF3NqncCiL16Zjfw6epWHLWmfgNgysD1GyCyEb7GXiaze2+r4oS2S1ZlaLN49y+YR5S84zvvKHCCPeFjhg/vLItNI4UgoVcm8Wkg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=k+MscEnP; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="k+MscEnP" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id B1EA3C406A4; Fri, 27 Feb 2026 13:58:18 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id D034A5FE46; Fri, 27 Feb 2026 13:58:02 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id A5E9310369456; Fri, 27 Feb 2026 14:57:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200680; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=AFs38/OxdKEkWsPHBLFEW6ncOCiAeXmWcRGJELRFO7o=; b=k+MscEnPWMO1WzRTrntU/MbQxcqqlWKLUxnI2rB32WpqFzRMZIt83ouPDz4JfOJovRJlUt 3gu1R3abZlJAubcJY3rJz7zZ0x07F/gyyln30T1C6eAjXyNJB5lIjMi2V1KP79hnG1tOhe JAGtg/CZG4CpBLJ9wlly6Xl7DaLKzY/8fAvwLr7V7P/S9+9oe3IovfZXzpG8kOD26HwTEq Vr49jgHxWe1KkvWtSKZ16YUvBrUmYMel4PQkoRkIKyr9pRbRU4Tp5P+LDVA9F1bpRFPWn6 r7s5tHVh7OLHX6FgXb1tgMqHXbaBya9m96aOmkUj9MmdYJ7umr6FfcBlT0karw== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 10/28] cxl/test: Use device_set_node() Date: Fri, 27 Feb 2026 14:54:07 +0100 Message-ID: <20260227135428.783983-11-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" The code set directly dev->fwnode. Use the dedicated helper to perform this operation. Signed-off-by: Herve Codina Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron --- tools/testing/cxl/test/cxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c index 81e2aef3627a..3d9107b2661c 100644 --- a/tools/testing/cxl/test/cxl.c +++ b/tools/testing/cxl/test/cxl.c @@ -1136,7 +1136,7 @@ static void mock_companion(struct acpi_device *adev, = struct device *dev) { device_initialize(&adev->dev); fwnode_init(&adev->fwnode, NULL); - dev->fwnode =3D &adev->fwnode; + device_set_node(dev, &adev->fwnode); adev->fwnode.dev =3D dev; } =20 --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2BC0328750C; Fri, 27 Feb 2026 13:58:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200703; cv=none; b=Z/XHbXLeLhrJ0ThF7sQ9HuMv8QleGZuJoHXhfz6qgGbU0SqhJ1pT0OBJUJpUtSpZaVbbJ8ljivlFM3XistjLTsKwtqULRoLgH7MHFIZl6Zw6hScNUDmDvAnZpcBQGwhAWGsFXknpWyN2P/v7ddKcslixqLdYIw/MJAe21xJrofU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200703; c=relaxed/simple; bh=Ej3E+0aXGGGnzjJdjf4dFtWiXvs795kwuR6jRG4cAl8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ne8cgzCNyCUSG1mt2EAnBQDScgdiWURXRwjIrdxz3QPsf6G1ZUfJqxHedDHyV2vSg0pYQCx2spgjV32TXMsmIZ5KMcFAVePDAFnlPsntGb9t1p4Y9tF81jarDJO5LYkswngT028MsW6MQE9oJcUXZSB97Q6W0Xt0ZnBceRP/uow= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=0otm3qdb; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="0otm3qdb" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 032F74E41912; Fri, 27 Feb 2026 13:58:20 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id CC6915FE46; Fri, 27 Feb 2026 13:58:19 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 9E40E1036944D; Fri, 27 Feb 2026 14:58:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200696; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=O4gtfW2qwYKFLS741oA+CuZQjKk6hOFRQ0u0aFdmEns=; b=0otm3qdbZfsuIF6becQEVvzUG2103wJpYJlBgHQCKWg+J/JEvZmwihiNnCTeQ1XWM2W6ym 7685klqXzG9BiwJCal2wQPFQpOgInhaLz6dSKMdVCckEhiDo02i302cqkOZSZ95f3dY6xe H3HnJGhQ8bn5Z5+m8HADhRFC3M8so8nXoHvr6s92CNqcbg00VRdd8auaXH+i56dgHva24h H106lnNja2AMPf/g5MaKlDHyf95jm9pPvEtvaVzk3nB4rsFJbR1rBiwywHgcfq9igI+HCu ZotLv1frrRaO3jy/wifAfxQmEHuKOMvge8g1qpbWkjO7NEdodw/uktwH9MmHrw== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 11/28] cxl/test: Use fw_devlink_set_device() Date: Fri, 27 Feb 2026 14:54:08 +0100 Message-ID: <20260227135428.783983-12-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" The code set directly fwnode.dev field. Use the dedicated fw_devlink_set_device() helper to perform this operation. Signed-off-by: Herve Codina Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron --- tools/testing/cxl/test/cxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c index 3d9107b2661c..7f232a869389 100644 --- a/tools/testing/cxl/test/cxl.c +++ b/tools/testing/cxl/test/cxl.c @@ -1137,7 +1137,7 @@ static void mock_companion(struct acpi_device *adev, = struct device *dev) device_initialize(&adev->dev); fwnode_init(&adev->fwnode, NULL); device_set_node(dev, &adev->fwnode); - adev->fwnode.dev =3D dev; + fw_devlink_set_device(&adev->fwnode, dev); } =20 #ifndef SZ_64G --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 85A0240F8C3; Fri, 27 Feb 2026 13:58:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200719; cv=none; b=Fa1ajJ05nUTblvLGMq+ZDxUP1mT7V8K12pmrqQ95byi5RsyaLGPRugFZs44Sjhchyyf0cUAOCU/vodq/Uu7K6b+VdGmB/MInGTE2YRi4WhrGn0R5X59TFeRQGXHME7ced9VVvblvwGV4YKhXxHyzIF023/diUakKFHcGB0v0N7w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200719; c=relaxed/simple; bh=94S/auSQnlqiMO0MBY7GNMga8poixO0zkKh7Tijvh1Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XhTye70M+rwis//82KpzAJvrTtqHEs6SRUP3VZ6I7yV0gptX2Mo501iLmgv9e4OItf/Z9L0zB392e/OAZ90o/W249C5H6UlQKXXW+FXkRKzE0Y6T7AeBPQW2WJwYUCW4LwQPdmDnLQ8gl20bRgZJvD3OUk5hlOdVJBqTmOL6NHI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=c+6axi+C; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="c+6axi+C" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 1B48FC406A8; Fri, 27 Feb 2026 13:58:51 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 3300E5FE74; Fri, 27 Feb 2026 13:58:35 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 99FCF1036945B; Fri, 27 Feb 2026 14:58:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200712; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=3kiBN+7JDb7znVHm1oVUABFZVov2dDFkX+PB5Hb4f2s=; b=c+6axi+CGO6EqS8ae+EfBU6akXsdBir9X6kxC1CrfpPCTNMbBf9i3cCQhdEndXY8xnM86e tAjHp7g2nCOP0xMsgyeQXVINpRIzxI27bHrkj93Dj5s2fphx3iuwt3cwiDnhjKW8k4yeAv aKJcA7sDoAO6kdqGOvOMvnxtqeE3xaE42AP8NeDOe+tV1Y6tcBuFz/2SbPLpsDaeisHF9u frNY3CbN7i92WN5QJ4QA+HFN13IbaDy+tcp1YiYNzRkQiwo4m6OxQszPGzaXXaYfIRaWJk UZMxNSk8RgcipvuRUX5AdxDxwaXYZkJ0KBN8HjbOWzmPhX/j2tRo16O5VRnfzA== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 12/28] PCI: of: Use fw_devlink_set_device() Date: Fri, 27 Feb 2026 14:54:09 +0100 Message-ID: <20260227135428.783983-13-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" The code set directly fwnode.dev field. Use the dedicated fw_devlink_set_device() helper to perform this operation. Signed-off-by: Herve Codina Reviewed-by: Andy Shevchenko --- drivers/pci/of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/of.c b/drivers/pci/of.c index 9f8eb5df279e..5fb7f501fd35 100644 --- a/drivers/pci/of.c +++ b/drivers/pci/of.c @@ -803,7 +803,7 @@ void of_pci_make_host_bridge_node(struct pci_host_bridg= e *bridge) * bus. Avoid any new device creation. */ of_node_set_flag(np, OF_POPULATED); - np->fwnode.dev =3D &bridge->dev; + fw_devlink_set_device(&np->fwnode, &bridge->dev); fwnode_dev_initialized(&np->fwnode, true); =20 ret =3D of_changeset_apply(cset); --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 62A05371052; Fri, 27 Feb 2026 13:58:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200733; cv=none; b=XFW50UMq03HtWvdpAV35lsrXtJQknNeU1b9bg41bZthoHnyBRKzJ1qdLkACzc7Zv6oQF2yaj2lCaurGOjmfwZ8IXoWLy3syDLcGCSwtQho6DQSsmrPXCx8Xt8TqUAemmPLnE66X2XCIB7O1qMifo/Xa+MnZhFzXTEwN9GTfU9F0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200733; c=relaxed/simple; bh=L23lGgbCNqkBwJpNpYsPxMg7r57kvKFqnA/eUe0ik7I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qtzRnd3TSm3MgEwCoDRAlkS0Tg6NmrQuaaQZyozjO4l2wAt7JdU8xsytBiPB1cCjqtbbu9Y2B5+9lLV2TmCgnf6W3L3yo3jw33WNMs2H5wZOfO6DE15+j4QKfWN3rYdD2kitKquNGM5ST2UgwMQVQshnkIvYsuxh+q9MJK0VJtA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=OCOAfyTa; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="OCOAfyTa" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 3C3444E41922; Fri, 27 Feb 2026 13:58:51 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 0CF2A5FE46; Fri, 27 Feb 2026 13:58:51 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 278381036944D; Fri, 27 Feb 2026 14:58:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200728; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=iMwFVtskD7lrHa/yvIrbdu/L2Of80knkDmIMEmyrkXU=; b=OCOAfyTatc8Qw0X52lJgzufSO0J8ocT5dFa7Zhh6u228zQFpU81kDty0jIzHTquMGTmYmW 1dWqocRW3PQ67VuM0ipx4um+/BvsfCLKaqciExCNe9eHS7TxIu1fuh4Cz5o5XOSYWCSTfa jRJExziGLq/FsEjh2laB8qyaWrrCFPpPJDXTAnydnyfuv0e7xC5+tONzNafHgGHJ17V4GJ HXjHm0YJvCBLCw0zDvu3VjdLMUMNdKh18VI5hZybBtM3F7XP1Jcm3hILyagbwFlNYMdY1U JCPh9pdPq/7j49wq6+nLqsAHj816Bf7RsnkiMgc/xzcswgMN/KhIEOLc8uvO1w== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 13/28] PCI: of: Set fwnode device of newly created PCI device nodes Date: Fri, 27 Feb 2026 14:54:10 +0100 Message-ID: <20260227135428.783983-14-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" Device-tree node can be created when CONFIG_PCI_DYNAMIC_OF_NODES. Those node are created and filled based on PCI core information but the fwnode device field is not set. When later an overlay is applied, this confuses fw_devlink. Indeed, without any device attached to the node, fw_devlink considers that this node will never become a device. When this node is pointed as a supplier, devlink looks at its ancestors in order to find a node with a device that could be used as the supplier. In the PCI use case, this leads to links that wrongly use the PCI root bridge device as the supplier instead of the expected PCI device. Setting the fwnode device to the device of the PCI device allows devlink to use this device as a supplier and so, correct links are created. Signed-off-by: Herve Codina --- drivers/pci/of.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/pci/of.c b/drivers/pci/of.c index 5fb7f501fd35..b694fcda16b1 100644 --- a/drivers/pci/of.c +++ b/drivers/pci/of.c @@ -709,6 +709,13 @@ void of_pci_make_dev_node(struct pci_dev *pdev) if (ret) goto out_free_node; =20 + /* + * Set the fwnode device in order to have fw_devlink creating links + * pointing to this PCI device instead of walking up to the PCI host + * bridge. + */ + fw_devlink_set_device(&np->fwnode, &pdev->dev); + ret =3D of_changeset_apply(cset); if (ret) goto out_free_node; --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA9AB3E95B3; Fri, 27 Feb 2026 13:59:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200751; cv=none; b=Vu49uA/3lwWGibv4jIq9talb4Zy8SMpx3ylNAkwIgOW/CeCyHSuynNk53D2jh56a8XPFY9ma1WYJy5niyc4WCcsbDWm6hx+z2H5BxT6WNOaWgPp0wo3mP/MDAl+VVAmzRbi4GT+4TzRrKfTOwV/iEgsj03Olmu5vb8JwVcFpYi4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200751; c=relaxed/simple; bh=4h2yYuYVfm6Oq6yHMs3qtFJ1/EsJ3+lJviBvaZ2hC1s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZY8FxstH2+1CU0LthWzBIeA7Zbnx1nUIRHG4p9Y3hewCSmpOTcUCEIrsFQlcd1z/IwUNPH/JLxUgbvqebT1xC/6+gxJV/QZJ7jScDPcfVcDxOmlXhgx5RVvEXz+xfZ3gYA34HbABfAaovm4HWA9m/IlcOSorRTdvozsXGTQF9r0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=sRsAUCuc; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="sRsAUCuc" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id B18644E41922; Fri, 27 Feb 2026 13:59:08 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 803D45FE46; Fri, 27 Feb 2026 13:59:08 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id DFF1A10369456; Fri, 27 Feb 2026 14:58:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200745; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=mvCVCaNxt5yWvSG+f0bAkdIRx8+iR7I3Ow45RsOxmKI=; b=sRsAUCucLArHhC5akY1MgM0rty4I4OOrOF40Zx6aMIFKT8TOp2kCKFJfKEERLxx+Et3k6g Uj0H1jU/AP5Tl2dJgQ8L0dKDSnrfPaQvztwHhevaPXWWVvmek3SxZ5hn2pB/WQz3+5XTNL F9PPlaEmiRcnhA9/9OfiIPfsaRpQTeZCgxYeZMU2mpSz7gBNaJ3MPLBjAWK2YI2g5JTthg MuHsaX9pp1lM9xaP+py25cCbImVVn8Wdjk7DhPRr4TK9h1LwWVCZ/rkPe+1nLlfO5X5DeF rpO29UkhLjN/kUjeUr9XFQFnn54MkbqzkLjLxh4BL2s0S6r3QPyuOA39XtaJyQ== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 14/28] PCI: of: Remove fwnode_dev_initialized() call for a PCI root bridge node Date: Fri, 27 Feb 2026 14:54:11 +0100 Message-ID: <20260227135428.783983-15-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" During the instantiation of devices described by a device-tree overlay applied on a PCI device, devlink displays the following kind of debug messages instead of creating the expected links: 'Not linking xxxx - might never become dev' Without those expected links, the device removal order cannot be correct. Those debug traces are printed by fw_devlink_create_devlink(). In our use case, they are all printed because the supplier of the link has at least one of its ancestor with its fwnode flag FWNODE_FLAG_INITIALIZED set. The culprit ancestor is the PCI root bridge. The fwnode related to the PCI root bridge is created dynamically by the of_pci_make_host_bridge_node() function. During this creation fwnode_dev_initialized() is called which set the FWNODE_FLAG_INITIALIZED flag. Calling fwnode_dev_initialized() tells devlink that the device related to this node is handled out of the driver core. This is not correct in our case. Indeed the device related to this firmware node is handled using driver core mechanisms and is fully compliant devlink expectations. Simply remove the fwnode_dev_initialized() call. With that done, the devlink debug messages are no more displayed and links that were missing are correctly created. Signed-off-by: Herve Codina --- drivers/pci/of.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pci/of.c b/drivers/pci/of.c index b694fcda16b1..0993257fe025 100644 --- a/drivers/pci/of.c +++ b/drivers/pci/of.c @@ -811,7 +811,6 @@ void of_pci_make_host_bridge_node(struct pci_host_bridg= e *bridge) */ of_node_set_flag(np, OF_POPULATED); fw_devlink_set_device(&np->fwnode, &bridge->dev); - fwnode_dev_initialized(&np->fwnode, true); =20 ret =3D of_changeset_apply(cset); if (ret) --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F16913D3D18; Fri, 27 Feb 2026 13:59:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200766; cv=none; b=D4LYno1xb/n6HU1I2P7rIY4cgADNEcTDMGlXNQ7/cy5YG16HOsPiKBhHnYj43Yh7MmZs46VPdWMaZUC7KP4iwYl8tPAFhta6RcXJcaIdP10rIFMitAfSWwsLAVvM4sVTuhRJyE5ak1Jlw3vHfC9PcftKB8wWS+ai+N1G2YnHaE8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200766; c=relaxed/simple; bh=a6PXb9i+X1sA4Or6Y0E0jaWxGpVSsTki8LaE/KXqa6Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CCsoQgROTk1v8RcZsz8UEYXFrVGKR37W1tHTh8V1tR37Ob1z8aQACQ2l2KX6yplvuWmf7NEGRQKRk/b46pMLMLfGVeajdgfbZeZCpeuvNiY4QMHemyZUykwnXaEu3FqjF45EbjuOCPRk9dRrgaMsZe1J/5kTDna7BhmO0CmaSHE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=w4eum9Fv; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="w4eum9Fv" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 821BDC406A4; Fri, 27 Feb 2026 13:59:39 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 9B8485FE46; Fri, 27 Feb 2026 13:59:23 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 89B991036944D; Fri, 27 Feb 2026 14:59:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200760; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=d6GGxvV9pG6IJ1z9yk6YAUQbBDjX/c3f4oqsz6zyCeA=; b=w4eum9Fv6LvEcDP17xGgtJmhQFEqh4dMU1qVvpHKgx0UdviP8T2rRlJE1uCx60GcOKm3W6 mMd6tPj3uYXoPHPT7e9qrC7MzGR2PWAWQlEEfuPi+9SXYT1Z/SXtLQRqYCwAxrGBnFygZ+ gm3xpEiDnuTrpz7nX+B2ntYGZkVym4XUeJSq19QHBx/nYfRWFtD+NH0wjMOy92HJ/k9o86 zyEMOMMZ4b6guUeRDpnHFAjQH9gMaBlgH17YpLBS1SXjyLvhmkBUNMjIBDJzt5GS2a7rNw bTqF8kKp8OY0J7hArYrrVXKYELUYXDDN8kRt3p/YGW8Mhn92CVDVKLqBNRcITQ== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 15/28] i2c: core: Introduce i2c_get_adapter_physdev() Date: Fri, 27 Feb 2026 14:54:12 +0100 Message-ID: <20260227135428.783983-16-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" The physical device providing an I2C adapter is the device that calls i2c_add_adapter() or variants and i2c_del_adapter(). Most of the time this physical device is the parent of the adapter device. Exceptions exist with i2c muxes. Indeed, in case of i2c muxes, the parent of the mux adapter device points to the adapter device the mux is connected to instead of the physical of this mux adapter. Introduce i2c_get_adapter_physdev() and a new physdev field in the adapter structure in order to ease the adapter physical device retrieval. Signed-off-by: Herve Codina Reviewed-by: Andi Shyti --- drivers/i2c/i2c-core-base.c | 16 ++++++++++++++++ include/linux/i2c.h | 3 +++ 2 files changed, 19 insertions(+) diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index 9c46147e3506..59214f0c84ec 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -1919,6 +1919,22 @@ struct i2c_adapter *i2c_get_adapter_by_fwnode(struct= fwnode_handle *fwnode) } EXPORT_SYMBOL(i2c_get_adapter_by_fwnode); =20 +/** + * i2c_get_adapter_physdev() - Get the physical device of an adapter + * @adapter: the adapter to get the physical device from + * + * Return: + * Look up and return the &struct device corresponding to the device suppl= ying + * this @adapter. + * + * The user must call put_device() once done with the physical device retu= rned. + */ +struct device *i2c_get_adapter_physdev(struct i2c_adapter *adapter) +{ + return get_device(adapter->physdev ?: adapter->dev.parent); +} +EXPORT_SYMBOL(i2c_get_adapter_physdev); + static void i2c_parse_timing(struct device *dev, char *prop_name, u32 *cur= _val_p, u32 def_val, bool use_def) { diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 20fd41b51d5c..dff04d20cafe 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -744,6 +744,7 @@ struct i2c_adapter { int timeout; /* in jiffies */ int retries; struct device dev; /* the adapter device */ + struct device *physdev; /* the physical device */ unsigned long locked_flags; /* owned by the I2C core */ #define I2C_ALF_IS_SUSPENDED 0 #define I2C_ALF_SUSPEND_REPORTED 1 @@ -911,6 +912,8 @@ struct i2c_adapter *i2c_get_adapter(int nr); void i2c_put_adapter(struct i2c_adapter *adap); unsigned int i2c_adapter_depth(struct i2c_adapter *adapter); =20 +struct device *i2c_get_adapter_physdev(struct i2c_adapter *adap); + void i2c_parse_fw_timings(struct device *dev, struct i2c_timings *t, bool = use_defaults); =20 /* Return the functionality mask */ --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F11483806A5; Fri, 27 Feb 2026 13:59:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200778; cv=none; b=KBU1jc19r0CjqcCGwPDHfbwpALrJyebR7MnZxIttE+wkl3wyWHPoC99EmJmCmgmuV7wceqL6ZfYxxavQyt2TVVZDHLfhNnWtjd6lhwUQnQucF5Avau8mvHIZt8Mp3UyVfybxz9r8d+hbgYqWgRZhtHitkBxxUh4jLJs7vrSTp7M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200778; c=relaxed/simple; bh=DaRfsV2u+e7/20CbFYhTmGEe9Lq4oc9ftgi7hzgtJxs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jU7IRtSh9L5Uy9oGPPUhzybwmzPkpQ4iqGTe8LA+D0FU7KMPlXSGSfrNmdzEZwperswx9FxONb5xjUyMLSCGWRVSCVjHdSb2lWtoi6s9H4mODcVmOtc6kPnXoXh5GLf6pAjGF4J0W3kZDu7atw56qD91y8qyUHm+rvR64onhEro= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=qhWmxsQs; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="qhWmxsQs" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id AFB0AC406A8; Fri, 27 Feb 2026 13:59:51 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id C197E5FE74; Fri, 27 Feb 2026 13:59:35 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 512ED10369455; Fri, 27 Feb 2026 14:59:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200773; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=EO+KwDm3fpx2sS0DmTpGwECNmbhB0N19pDgf5whzoMI=; b=qhWmxsQsRt0OU1IK3m5H6p4bRNT1Je3fcsO7325r4sNhWLQFLi1BVbQ+7TDw12k2BvQNi1 3X84m/W2WVyTgydX7dje7kg+8+u67v1eMf2FFLH/OAsvvRtX6o85OrXPw5TVb1fyYazYI5 44uSEJw58YISkXHDI/w9HAc5HHgMsb59EQ9zUmkcX3YyE6XwDq2KKjs1wKIuGgMlKiur4u q1kUn3fAYxbuotjnD+8x/TfAsJKyZvoOvXonz9wvO1zXthYxO35kDLPiihQ3c5YMXdg1aF kJcU2UWrZkAGwneOMRxSa9BZAIxsbD6CKQ/NyHpoEqaahluagUjG2IEmFQlCRw== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 16/28] i2c: mux: Set adapter physical device Date: Fri, 27 Feb 2026 14:54:13 +0100 Message-ID: <20260227135428.783983-17-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" For i2c muxes, the parent of the mux adapter device is the adapter device the mux is connected to. This parent is not the physical device related to the mux adapter. Indeed, the physical device of the mux adapter is the mux device itself. Fill the adap.physdev with the mux device. Signed-off-by: Herve Codina Reviewed-by: Andi Shyti --- drivers/i2c/i2c-mux.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/i2c/i2c-mux.c b/drivers/i2c/i2c-mux.c index 681a201c239b..f4e73e7a0e33 100644 --- a/drivers/i2c/i2c-mux.c +++ b/drivers/i2c/i2c-mux.c @@ -315,6 +315,7 @@ int i2c_mux_add_adapter(struct i2c_mux_core *muxc, priv->adap.algo =3D &priv->algo; priv->adap.algo_data =3D priv; priv->adap.dev.parent =3D &parent->dev; + priv->adap.physdev =3D muxc->dev; priv->adap.retries =3D parent->retries; priv->adap.timeout =3D parent->timeout; priv->adap.quirks =3D parent->quirks; --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D8143806A5; Fri, 27 Feb 2026 13:59:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200791; cv=none; b=cxT70FCHoff7XUJu0Xu9lDlTv69qolhYGqJ0bF7x94X/WlW4NTd0QMXVkokZkWLttw1im8p+f282qU0e0r7Yi0SSKSap7Fxyjf78YI41GKYISRQju9ML+qWI5VX+JcjyCuJdA8+LA1Igi1ttdOBh4nyJFWszEt+HNdq4ZUIgdxw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200791; c=relaxed/simple; bh=uDuPgt2o/9oBQHh+Cpy7Gf83um6TASnvbhCiTbvCQdY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CN7GoYAtsuRvkdQaEDbPaaBCSjUj5B119aHf474n3XZ/UMZD3SRCdv/6H0jZULsnBSa5M7SZ3XCexMmy+XjL5WTEvjvlEhNX3mZB7NkROMNTYDVj6DIfAy/PWh39ziQZTkJHE8rr9tcN1UBXGzE60b3wyJMYEU09wPWjtc2Edy0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=vSw2fqAd; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="vSw2fqAd" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id F0636C406A4; Fri, 27 Feb 2026 14:00:04 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 13C0E5FE46; Fri, 27 Feb 2026 13:59:49 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 8546010369467; Fri, 27 Feb 2026 14:59:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200786; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=EB2C+jRFMxDkKtJvrc3FzQhnrQCg9ZYzY6GBMb2A8G4=; b=vSw2fqAdau80tBAcMKmbvfZk01HIrOy6KngwSqgown8ZRT7LGu3SADWMaopicOdhSEGz4w f7k7rk0orpMMK6MTHwU5WCQNGIrSd4vxmIUWnciBd6J+gcMtMYL+O9/SUhwDaHKwxofhet fF4P3vRALO0Fijd9OCZZmvl2ikoHddFka9Ue9zqDRnEVjBM3o0ubpMc6osAp/LIKnMT8+K 2jGzfiIYeiv561PZjdFvlw5GbHNz6td/wD6/y4ShWbwSVG8fB1hARl7ZpbRkq33KJigmT4 kPjZBC+xlE2hKH1Ub+FIo5v3rRETI3ktdG5yAdgQOIo0IQ4HQq6QtHJzKzhXnA== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 17/28] i2c: mux: Create missing devlink between mux and adapter physical device Date: Fri, 27 Feb 2026 14:54:14 +0100 Message-ID: <20260227135428.783983-18-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" When removing an i2c controller device handling an i2c bus where an i2c mux is connected to, the removal process hangs and is stuck in the wait_completion() call done in i2c_del_adapter(). The i2c_del_adapter() tries to removed the i2c adapter related to the i2c controller device and the wait_completion() is waiting for the i2c adapter device release. This release is performed when the device is no more used (i.e. refcount reaches zero). When an i2c mux is involved in an i2c path, the struct dev topology is the following: +----------------+ +-------------------+ | i2c controller | | i2c mux | | device | | device | | ^ | | | | | | | | | dev's parent | | | | | | | | | i2c adapter | | i2c adapter chanX | | device <---- dev's parent ------ device | | (no driver) | | (no driver) | +----------------+ +-------------------+ When an i2c mux device creates an i2c adapter for its downstream channel, a reference is taken to its adapter dev's parent. This parent is the i2c mux upstream adapter device. No relationship exists between the i2c mux device itself and the i2c controller device (physical device) in order to have the i2c mux device calling i2c_del_adapter() to remove its downstream adapters and so, release references taken to the upstream adapter. This consumer/supplier relationship is typically a devlink relationship. Also, i2c muxes can be chained and so, the upstream adapter can be supplied by either an i2c controller device or an other i2c mux device. In order to get the physical device of the adapter a mux is connected to, rely on the newly introduced i2c_adapter_get_physdev() and create the missing devlink between the i2c mux device and the physical device of the adapter the mux is connected to. With that done, the i2c mux device is removed before the device handling the upstream i2c adapter (i2c controller device or i2c mux device). All references are released and the i2c_del_adapter() call performed by driver handling the upstream adapter device is not blocking anymore. Signed-off-by: Herve Codina --- drivers/i2c/i2c-mux.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/drivers/i2c/i2c-mux.c b/drivers/i2c/i2c-mux.c index f4e73e7a0e33..26470a7c2eea 100644 --- a/drivers/i2c/i2c-mux.c +++ b/drivers/i2c/i2c-mux.c @@ -268,7 +268,9 @@ int i2c_mux_add_adapter(struct i2c_mux_core *muxc, u32 force_nr, u32 chan_id) { struct i2c_adapter *parent =3D muxc->parent; + struct device *parent_physdev; struct i2c_mux_priv *priv; + struct device_link *dl; char symlink_name[20]; int ret; =20 @@ -375,6 +377,29 @@ int i2c_mux_add_adapter(struct i2c_mux_core *muxc, ACPI_COMPANION(muxc->dev), chan_id); =20 + /* + * There is no relationship set between the mux device and the physical + * device handling the parent adapter. Create this missing relationship + * in order to remove the i2c mux device (consumer) and so the dowstream + * channel adapters before removing the physical device (supplier) which + * handles the i2c mux upstream adapter. + */ + parent_physdev =3D i2c_get_adapter_physdev(parent); + if (!parent_physdev) { + dev_err(muxc->dev, "failed to get the parent physical device\n"); + ret =3D -ENODEV; + goto err_free_priv; + } + dl =3D device_link_add(muxc->dev, parent_physdev, DL_FLAG_AUTOREMOVE_CONS= UMER); + if (!dl) { + dev_err(muxc->dev, "failed to create device link to %s\n", + dev_name(parent_physdev)); + put_device(parent_physdev); + ret =3D -EINVAL; + goto err_free_priv; + } + put_device(parent_physdev); + if (force_nr) { priv->adap.nr =3D force_nr; ret =3D i2c_add_numbered_adapter(&priv->adap); --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 27FAA3D3D18; Fri, 27 Feb 2026 14:00:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200809; cv=none; b=Ah/CNqPZCXCC9mETGQ+5ILv3kyyen2QaxafFDxbEVe/Qcc/Pn3Oo86xdk65P/Oj44JB5HhcTHAU6nNwkR3H5XMLuu0oULlcwLzGIxwXOt2qay87i5BPvrIwWOtDJWB3V0HZ6u/oL537YBUOLsdsCgpcjcc0VQOpIwAUZR2TkNBA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200809; c=relaxed/simple; bh=opKdfdVK4CzMrQ5mOvu1aN+T6KAaaDtxxB/GB80aspg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sxCfJSF3844aq9edkTpEIvsafYdBQq6wPsKIkZj4cLtM5Yi6N9IZ/ddfTS2o8wW0VIJ2ciM8Gk/f2n/y7+Y6UGaUY8KclPoBiumxUzhcE/oGiOAuvXOjPtcykVnPWwLxMoJQoCXc1Q1IdiPyWChMv88ZcjOeV/tPNP1choFIxUE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=RodzvQE8; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="RodzvQE8" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 0A1FA4E41922; Fri, 27 Feb 2026 14:00:07 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id CD5D85FE74; Fri, 27 Feb 2026 14:00:06 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 477F81036944D; Fri, 27 Feb 2026 14:59:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200803; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=vTj0jmIFVnvyBrAo1BELaCko6WzI+kUICmGliPFJzCI=; b=RodzvQE8dy8FbMbFSh55AO4h/RFQLpNRxUE6bLJ+qsRE0NqPknmw2Ts0eGqfgP7fPvkFWD cUSMsD4e951ssXXwrKVsoF4zUHaaGfzz9XFNkQGKEFR6ZwlWruPpc2m/verqWOHqrSjv3Y /Nj8hI0nWOg4KksjNe1IYsggn2HWfFIF0MLKHj8apKg7JPY7VuPLeuymkil1U3FXhGGVam Urbs4samzKIW1lnZUYn+R2pzYRJ3QOrtNUKa27fkKCIejxwq9F92tsLb4O5P5p2jTXW/vD HXqRVcteVuPZD8wUmC6pc7fvVophxyNFnEmFpum8+5zHrjuHUIRZ/nrnCtr7Kg== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 18/28] of: property: Allow fw_devlink device-tree on x86 Date: Fri, 27 Feb 2026 14:54:15 +0100 Message-ID: <20260227135428.783983-19-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" PCI drivers can use a device-tree overlay to describe the hardware available on the PCI board. This is the case, for instance, of the LAN966x PCI device driver. Adding some more nodes in the device-tree overlay adds some more consumer/supplier relationship between devices instantiated from this overlay. Those fw_node consumer/supplier relationships are handled by fw_devlink and are created based on the device-tree parsing done by the of_fwnode_add_links() function. Those consumer/supplier links are needed in order to ensure a correct PM runtime management and a correct removal order between devices. For instance, without those links a supplier can be removed before its consumers is removed leading to all kind of issue if this consumer still want the use the already removed supplier. The support for the usage of an overlay from a PCI driver has been added on x86 systems in commit 1f340724419ed ("PCI: of: Create device tree PCI host bridge node"). In the past, support for fw_devlink on x86 had been tried but this support has been removed in commit 4a48b66b3f52 ("of: property: Disable fw_devlink DT support for X86"). Indeed, this support was breaking some x86 systems such as OLPC system and the regression was reported in [0]. Instead of disabling this support for all x86 system, use a finer grain and disable this support only for the possible problematic subset of x86 systems (at least OLPC and CE4100). Those systems use a device-tree to describe their hardware. Identify those systems using key properties in the device-tree. Signed-off-by: Herve Codina Link: https://lore.kernel.org/lkml/3c1f2473-92ad-bfc4-258e-a5a08ad73dd0@web= .de/ [0] --- drivers/of/property.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/drivers/of/property.c b/drivers/of/property.c index 50d95d512bf5..80800a20d1ac 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -1620,12 +1620,36 @@ static int of_fwnode_irq_get(const struct fwnode_ha= ndle *fwnode, return of_irq_get(to_of_node(fwnode), index); } =20 +static int match_property_by_path(const char *node_path, const char *prop_= name, + const char *value) +{ + struct device_node *np __free(device_node) =3D of_find_node_by_path(node_= path); + + return of_property_match_string(np, prop_name, value); +} + +static bool of_is_fwnode_add_links_supported(void) +{ + static int is_supported =3D -1; + + if (!IS_ENABLED(CONFIG_X86)) + return true; + + if (is_supported !=3D -1) + return !!is_supported; + + is_supported =3D !((match_property_by_path("/soc", "compatible", "intel,c= e4100-cp") >=3D 0) || + (match_property_by_path("/", "architecture", "OLPC") >=3D 0)); + + return !!is_supported; +} + static int of_fwnode_add_links(struct fwnode_handle *fwnode) { const struct property *p; struct device_node *con_np =3D to_of_node(fwnode); =20 - if (IS_ENABLED(CONFIG_X86)) + if (!of_is_fwnode_add_links_supported()) return 0; =20 if (!con_np) --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E2A04218A1; Fri, 27 Feb 2026 14:00:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200832; cv=none; b=mqdpVeGoefLP3jrmfTrujzbWdPx2fmmHWUKvuqBuokbcte1VS9s+ycho/b+Ncjcv4fU+bU75NPh8tS8xAdHrAhNuqIHTZnjhFeZ6urmQKrZyh1JHLhpQp6eBK7KsDtb6Az6MDA8Z9inIHO+BtAJAkQEParjid1lanV8OBLtF/14= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200832; c=relaxed/simple; bh=t4S3Im2Q9VHd65b1LNW0YeMdFBvQQnKTQdoHV0TNdoM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=j7Az/VOmWTG6lX6hSBT2n9Jj2jWh3YD+yT8FCIeUGHapBSnx1zvANK2sPOzeFPaDvjwHnbDY5s4GpMkNDBVZ9Ha8hE6DQfaly5LxUY5DlzEaJoBZuCW/fd8VAmG9bA8xur5HDDbwxMxh9RR0G46BtF9mwNrWqp1LEa20H2vVjq4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=fFN1Mr7T; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="fFN1Mr7T" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 5CE501A1B64; Fri, 27 Feb 2026 14:00:29 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 2D25F5FE46; Fri, 27 Feb 2026 14:00:29 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id B1DF51036946B; Fri, 27 Feb 2026 15:00:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200823; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=yjXgFwtIgYgLY+NqzIdKN5xDoSSBCrFHV69qZDYtiog=; b=fFN1Mr7TgwZdDKmtKNAjCJMQWiyfFwr/M+zlCiuLD+TAIphnCVpCqBUz4GjqUVLgLcVMiN iWjy1Jq/0syaYQTgtz7ZYl3uuT0hB9V6DgB26shloy6rnEfDcpOhEo3C6mJ+uRLP5W8La5 ciDEdeWtxn0vhNhdf1cdiTvRPTOKhmLPQP11W5WkJg5K498ddhrRJHCQX5e7+psNfGJ7Bj pVfPN+S/X7w8Wxd8KEKeK9iQ9OJzG+PCXEhLJqN2ewcbKC//T2iwVq9WHQW7nUBbFU/FfA bB7c2KSxF5B0l9NMRic4bFjYzWqw0C2TY5jup1wa6MrG6KcCAVmS9wY+jx1xwg== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 19/28] clk: lan966x: Add MCHP_LAN966X_PCI dependency Date: Fri, 27 Feb 2026 14:54:16 +0100 Message-ID: <20260227135428.783983-20-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" The lan966x clock controller depends on the LAN969x architecture or the LAN966x SoC. This clock controller can be used by the LAN966x PCI device and so it needs to be available when the LAN966x PCI device is enabled. Signed-off-by: Herve Codina Acked-by: Stephen Boyd --- drivers/clk/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig index 3d803b4cf5c1..0231dd449134 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -278,7 +278,7 @@ config COMMON_CLK_LAN966X tristate "Generic Clock Controller driver for LAN966X SoC" depends on HAS_IOMEM depends on OF - depends on SOC_LAN966 || ARCH_LAN969X || COMPILE_TEST + depends on SOC_LAN966 || ARCH_LAN969X || MCHP_LAN966X_PCI || COMPILE_TEST help This driver provides support for Generic Clock Controller(GCK) on LAN966X SoC. GCK generates and supplies clock to various peripherals --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E89241B35F; Fri, 27 Feb 2026 14:00:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200850; cv=none; b=BO/osJbJ/130Yf7G+1Fl6U/sIiJ66xP9J/xT3lpFvqBPeKm5qEhar3Xdu/f1suqbWXWEGBVZtvUHNJUZa9pXMz4v2KsOWX1XwSywObIR6O5PtRDAM9h1eKeVt0dU1ZAhsjioXZ7P2LdbkFFOpZK+TrCZTzCuNpbTPKsPPiU9e/0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200850; c=relaxed/simple; bh=z5qo+njxOq59cfnMFpWRPyGgRlTcviG2FIatZoRwOvA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pYL9q+MnWz6Qa+WaaRE8hkiOcxkpLPK+tvvJlgdK0O+f5piRds3E/m2mxsqh4SrOmiPSFOGUY2rqYrYKJroxsShTRliuT2EmDGdpYAqBvlUDlJsL/PrXzZsa63AsrvNffsKLMAwjnove/mTGqjd6NQAtux9C6oU1AjnVbPEz8j4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=R8PR1GRd; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="R8PR1GRd" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 66DBF4E41912; Fri, 27 Feb 2026 14:00:46 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 3CC915FE46; Fri, 27 Feb 2026 14:00:46 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 5F60A1036946F; Fri, 27 Feb 2026 15:00:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200842; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=+z4Mrq3/T+2B2/cuOhiNyTSuL/eh3kHVXp5z8mKO858=; b=R8PR1GRdilUpqqOvhhGPsRZnaqHC6zNY1SPSac42QkHa1KE18j1aSj3wQDpDzOvAZSE9Oh Guj6PLsenxC3g9HSGqej2ADbLkIlHtAoN6BHNhHTAmy+WFZJ7asIbuX5F/RPfoWtsSnmNc v9kud2Jw6vWmzu/pztvGKuQ94UEeq6EMbgxsB+agzxgpOd4aDODpCckdGhJMjdiSqIa5Ph eEsrfaXugkZnXD6SrZWzCnCZGmr4c+fKDN/WeAczQC/EaM3d/DI2EbTwapsWZpVNpltqVQ h2BLP/aXo61HdPcVjGbiFe0OrV6MDgylpAxlxk3Guw13l9YovaZrckn997mAqw== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 20/28] i2c: busses: at91: Add MCHP_LAN966X_PCI dependency Date: Fri, 27 Feb 2026 14:54:17 +0100 Message-ID: <20260227135428.783983-21-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" The AT91 I2C driver depends on ARCH_MICROCHIP. This I2C controller can be used by the LAN966x PCI device and so it needs to be available when the LAN966x PCI device is enabled. Signed-off-by: Herve Codina Acked-by: Andi Shyti --- drivers/i2c/busses/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index e11d50750e63..f43b3e8ca317 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -417,7 +417,7 @@ config I2C_ASPEED =20 config I2C_AT91 tristate "Atmel AT91 I2C Two-Wire interface (TWI)" - depends on ARCH_MICROCHIP || COMPILE_TEST + depends on ARCH_MICROCHIP || MCHP_LAN966X_PCI || COMPILE_TEST help This supports the use of the I2C interface on Atmel AT91 processors. --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 666151A285; Fri, 27 Feb 2026 14:01:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200866; cv=none; b=sZOUpuV4gFJSqleDYSXYs/JWMy+TttNLmztO4wZzAskzypHxY2pf1x5iApKrE0uZ/tcW/pqP6KpaPBdL3pBubSj9P7kdcRgDuccxj/2caROoOqIH+GDT6du2kh69QWCgIOkmUy7rBSNLqtcVc8HizwhZ5eQTG5TmNDNQv1Ejw0U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200866; c=relaxed/simple; bh=DItZty9R5mtd5FXD6pz2hLLOYiHipPPsCn4tibvE0LM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HGnkvcz28BNeGWryJAJ/kFskx1YpvjW/Ry+0Y0kf8zuf6cTui/NZDBkBlPw04N1v5V9kM3P2v5CgE2s179K3LwkGo9YIqB8BOAMxYbsfkxpCom8jY4XnSb4tjA0EgM/nCEyWNe69UaaDENPqZNBUyOcxXM3nivYNmPna2+uq3DE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=i3GWffdV; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="i3GWffdV" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 54E861A1B17; Fri, 27 Feb 2026 14:01:04 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 2A55F5FE46; Fri, 27 Feb 2026 14:01:04 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id A15A21036946B; Fri, 27 Feb 2026 15:00:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200859; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=MeQEnVXAUpOp9CamCeIUdO4wkcnSXPVtha4nwOJPHlU=; b=i3GWffdVCTUA9Lv4C1lteoG6oEaxjEx5Gv1ZbiYKINjwCDbJ7v4PiLZaDRP9x8UTeiYzSV A3/ynlZaS9Q1fa9y7XNu1WCOe1QQMH2xz2u+xEPGz0sOI+mghhkDzXYzN9cEYnQXMyHxtT c3uQy/yhOOGMgQmYbExo8lWFkxkK+StWOEEaxcOcireVSEvcrNso2c1T2GjvkE4jdwXV2W mvHWdjA43TOUjEKh/qmnpEduNILbiFiglNZptHCtcz5FQCJTlcLP4JVJ0g9v7CqCoWEbOG e1pjGiudq+S1dk/zu0Er8l/hPIsj1DAd+p93P4SUEIDDSD8lsAfvsxAoeeUeyg== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 21/28] misc: lan966x_pci: Fix dtso nodes ordering Date: Fri, 27 Feb 2026 14:54:18 +0100 Message-ID: <20260227135428.783983-22-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" Nodes available in the dtso are not ordered by their unit address. Fix that re-ordering them according to their unit address. Signed-off-by: Herve Codina --- drivers/misc/lan966x_pci.dtso | 99 +++++++++++++++++------------------ 1 file changed, 49 insertions(+), 50 deletions(-) diff --git a/drivers/misc/lan966x_pci.dtso b/drivers/misc/lan966x_pci.dtso index 7b196b0a0eb6..94a967b384f3 100644 --- a/drivers/misc/lan966x_pci.dtso +++ b/drivers/misc/lan966x_pci.dtso @@ -59,6 +59,50 @@ pci-ep-bus@0 { ranges =3D <0xe2000000 0x00 0x00 0x00 0x2000000 0xe0000000 0x01 0x00 0x00 0x1000000>; =20 + switch: switch@e0000000 { + compatible =3D "microchip,lan966x-switch"; + reg =3D <0xe0000000 0x0100000>, + <0xe2000000 0x0800000>; + reg-names =3D "cpu", "gcb"; + + interrupt-parent =3D <&oic>; + interrupts =3D <12 IRQ_TYPE_LEVEL_HIGH>, + <9 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names =3D "xtr", "ana"; + + resets =3D <&reset 0>; + reset-names =3D "switch"; + + pinctrl-names =3D "default"; + pinctrl-0 =3D <&tod_pins>; + + ethernet-ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port0: port@0 { + phy-handle =3D <&lan966x_phy0>; + + reg =3D <0>; + phy-mode =3D "gmii"; + phys =3D <&serdes 0 CU(0)>; + }; + + port1: port@1 { + phy-handle =3D <&lan966x_phy1>; + + reg =3D <1>; + phy-mode =3D "gmii"; + phys =3D <&serdes 1 CU(1)>; + }; + }; + }; + + cpu_ctrl: syscon@e00c0000 { + compatible =3D "microchip,lan966x-cpu-syscon", "syscon"; + reg =3D <0xe00c0000 0xa8>; + }; + oic: oic@e00c0120 { compatible =3D "microchip,lan966x-oic"; #interrupt-cells =3D <2>; @@ -67,11 +111,6 @@ oic: oic@e00c0120 { reg =3D <0xe00c0120 0x190>; }; =20 - cpu_ctrl: syscon@e00c0000 { - compatible =3D "microchip,lan966x-cpu-syscon", "syscon"; - reg =3D <0xe00c0000 0xa8>; - }; - reset: reset@e200400c { compatible =3D "microchip,lan966x-switch-reset"; reg =3D <0xe200400c 0x4>, <0xe00c0000 0xa8>; @@ -104,14 +143,6 @@ fc0_a_pins: fcb4-i2c-pins { pins =3D "GPIO_9", "GPIO_10"; function =3D "fc0_a"; }; - - }; - - serdes: serdes@e202c000 { - compatible =3D "microchip,lan966x-serdes"; - reg =3D <0xe202c000 0x9c>, - <0xe2004010 0x4>; - #phy-cells =3D <2>; }; =20 mdio1: mdio@e200413c { @@ -133,43 +164,11 @@ lan966x_phy1: ethernet-lan966x_phy@2 { }; }; =20 - switch: switch@e0000000 { - compatible =3D "microchip,lan966x-switch"; - reg =3D <0xe0000000 0x0100000>, - <0xe2000000 0x0800000>; - reg-names =3D "cpu", "gcb"; - - interrupt-parent =3D <&oic>; - interrupts =3D <12 IRQ_TYPE_LEVEL_HIGH>, - <9 IRQ_TYPE_LEVEL_HIGH>; - interrupt-names =3D "xtr", "ana"; - - resets =3D <&reset 0>; - reset-names =3D "switch"; - - pinctrl-names =3D "default"; - pinctrl-0 =3D <&tod_pins>; - - ethernet-ports { - #address-cells =3D <1>; - #size-cells =3D <0>; - - port0: port@0 { - phy-handle =3D <&lan966x_phy0>; - - reg =3D <0>; - phy-mode =3D "gmii"; - phys =3D <&serdes 0 CU(0)>; - }; - - port1: port@1 { - phy-handle =3D <&lan966x_phy1>; - - reg =3D <1>; - phy-mode =3D "gmii"; - phys =3D <&serdes 1 CU(1)>; - }; - }; + serdes: serdes@e202c000 { + compatible =3D "microchip,lan966x-serdes"; + reg =3D <0xe202c000 0x9c>, + <0xe2004010 0x4>; + #phy-cells =3D <2>; }; }; }; --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D5DD3F0753; Fri, 27 Feb 2026 14:01:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200884; cv=none; b=WFjbIHzw24TJpV6F1P53nX1EK3/62leQXAnAxb8WaS49lLap+JBL3ui9G0OZgRd6OfRbpdDV8Z2lTha27cOkAsdWI973qs0WtuUyI52WiirAp4ZWooOVsgziOfHgthIydcRTFcSGtmIkRaTBUq36Z/Al9ogJI8GBj+yxu/FLGaU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200884; c=relaxed/simple; bh=/I/gBBSQjoZsOjIL0B+Qyl0IZTqk8YHRpzEsG7bIEWg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bBNOhay8yveuIGaJbso7ACX4jSexvWApUy4dH5699tYqDWTqPE7QL36QIMMwUIe70GwiaRTukIYdK7X4VOgjrqToORGXzwh2rR6/jPCNOi2M9pjEoExZaPegF3dCCiinHS4jOvyNdKyBlQi4GiX8FtGrCJoBL2JaFm7m4n3SVNM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=RA2J5DGJ; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="RA2J5DGJ" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 28F064E419C1; Fri, 27 Feb 2026 14:01:21 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id E9D465FE74; Fri, 27 Feb 2026 14:01:20 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 737341036946C; Fri, 27 Feb 2026 15:01:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200876; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=yHQfhazYClBqFiWTBjKI2wJ8nGAA1W+1s1WNH3rEj08=; b=RA2J5DGJjvaHr3thuwyrM9YpSR3bSYIyaWYs2yfdVNtUYlEJ1U0qvUwm+hYRktYuUEBO7E BoB1rKPMuI9NZ9vmpLFlTdfFB3ZNicl0jNdzl/U88zqo4H4uC+AJDA0UUCKaeJHL82UjIs 3WADnsZ1x8TGvLHwwFuMlyDAz/o/PekmKr62MkHMp5iOYQ4yvlZZlS2N0N//xFwl3lm+bP Xz1q2KZExZArjOb4yxcfL84iWJ1Amr0gBMfquqaxlIfoZMrs6zvq9TSMkCL7DiDgc20Ixf nsu9c0HEhQBEkzhFYeq7+A43sf84u3NRMVUGy6Yhy53bH+6DEbntPlmx9l2ANw== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 22/28] misc: lan966x_pci: Split dtso in dtsi/dtso Date: Fri, 27 Feb 2026 14:54:19 +0100 Message-ID: <20260227135428.783983-23-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" The lan966x_pci.dtso file contains descriptions related to both the LAN966x PCI device chip and the LAN966x PCI device board where the chip is soldered. Split the file in order to have: - lan966x_pci.dtsi The description related to the PCI chip. - lan966x_pci.dtso The description of the PCI board. Signed-off-by: Herve Codina Reviewed-by: Andrew Lunn --- MAINTAINERS | 1 + drivers/misc/lan966x_pci.dtsi | 130 +++++++++++++++++++++++++ drivers/misc/lan966x_pci.dtso | 175 +++++++--------------------------- 3 files changed, 166 insertions(+), 140 deletions(-) create mode 100644 drivers/misc/lan966x_pci.dtsi diff --git a/MAINTAINERS b/MAINTAINERS index 55af015174a5..441fe74e7ef7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -17305,6 +17305,7 @@ MICROCHIP LAN966X PCI DRIVER M: Herve Codina S: Maintained F: drivers/misc/lan966x_pci.c +F: drivers/misc/lan966x_pci.dtsi F: drivers/misc/lan966x_pci.dtso =20 MICROCHIP LAN969X ETHERNET DRIVER diff --git a/drivers/misc/lan966x_pci.dtsi b/drivers/misc/lan966x_pci.dtsi new file mode 100644 index 000000000000..170298084fa5 --- /dev/null +++ b/drivers/misc/lan966x_pci.dtsi @@ -0,0 +1,130 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2025 Microchip UNG + */ + +#include + +cpu_clk: clock-600000000 { + compatible =3D "fixed-clock"; + #clock-cells =3D <0>; + clock-frequency =3D <600000000>; /* CPU clock =3D 600MHz */ +}; + +ddr_clk: clock-30000000 { + compatible =3D "fixed-clock"; + #clock-cells =3D <0>; + clock-frequency =3D <30000000>; /* Fabric clock =3D 30MHz */ +}; + +sys_clk: clock-15625000 { + compatible =3D "fixed-clock"; + #clock-cells =3D <0>; + clock-frequency =3D <15625000>; /* System clock =3D 15.625MHz */ +}; + +pci-ep-bus@0 { + compatible =3D "simple-bus"; + #address-cells =3D <1>; + #size-cells =3D <1>; + + /* + * map @0xe2000000 (32MB) to BAR0 (CPU) + * map @0xe0000000 (16MB) to BAR1 (AMBA) + */ + ranges =3D <0xe2000000 0x00 0x00 0x00 0x2000000 + 0xe0000000 0x01 0x00 0x00 0x1000000>; + + switch: switch@e0000000 { + compatible =3D "microchip,lan966x-switch"; + reg =3D <0xe0000000 0x0100000>, + <0xe2000000 0x0800000>; + reg-names =3D "cpu", "gcb"; + interrupt-parent =3D <&oic>; + interrupts =3D <12 IRQ_TYPE_LEVEL_HIGH>, + <9 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names =3D "xtr", "ana"; + resets =3D <&reset 0>; + reset-names =3D "switch"; + status =3D "disabled"; + + ethernet-ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port0: port@0 { + reg =3D <0>; + status =3D "disabled"; + }; + + port1: port@1 { + reg =3D <1>; + status =3D "disabled"; + }; + }; + }; + + cpu_ctrl: syscon@e00c0000 { + compatible =3D "microchip,lan966x-cpu-syscon", "syscon"; + reg =3D <0xe00c0000 0xa8>; + }; + + oic: oic@e00c0120 { + compatible =3D "microchip,lan966x-oic"; + #interrupt-cells =3D <2>; + interrupt-controller; + interrupts =3D <0>; /* PCI INTx assigned interrupt */ + reg =3D <0xe00c0120 0x190>; + }; + + reset: reset@e200400c { + compatible =3D "microchip,lan966x-switch-reset"; + reg =3D <0xe200400c 0x4>, <0xe00c0000 0xa8>; + reg-names =3D "gcb","cpu"; + #reset-cells =3D <1>; + cpu-syscon =3D <&cpu_ctrl>; + }; + + gpio: pinctrl@e2004064 { + compatible =3D "microchip,lan966x-pinctrl"; + reg =3D <0xe2004064 0xb4>, + <0xe2010024 0x138>; + resets =3D <&reset 0>; + reset-names =3D "switch"; + gpio-controller; + #gpio-cells =3D <2>; + gpio-ranges =3D <&gpio 0 0 78>; + interrupt-parent =3D <&oic>; + interrupt-controller; + interrupts =3D <17 IRQ_TYPE_LEVEL_HIGH>; + #interrupt-cells =3D <2>; + }; + + mdio1: mdio@e200413c { + #address-cells =3D <1>; + #size-cells =3D <0>; + compatible =3D "microchip,lan966x-miim"; + reg =3D <0xe200413c 0x24>, + <0xe2010020 0x4>; + resets =3D <&reset 0>; + reset-names =3D "switch"; + status =3D "disabled"; + + lan966x_phy0: ethernet-lan966x_phy@1 { + reg =3D <1>; + status =3D "disabled"; + }; + + lan966x_phy1: ethernet-lan966x_phy@2 { + reg =3D <2>; + status =3D "disabled"; + }; + }; + + serdes: serdes@e202c000 { + compatible =3D "microchip,lan966x-serdes"; + reg =3D <0xe202c000 0x9c>, + <0xe2004010 0x4>; + #phy-cells =3D <2>; + }; +}; diff --git a/drivers/misc/lan966x_pci.dtso b/drivers/misc/lan966x_pci.dtso index 94a967b384f3..3ad50abee72d 100644 --- a/drivers/misc/lan966x_pci.dtso +++ b/drivers/misc/lan966x_pci.dtso @@ -3,10 +3,7 @@ * Copyright (C) 2022 Microchip UNG */ =20 -#include #include -#include -#include #include =20 /dts-v1/; @@ -29,148 +26,46 @@ __overlay__ { #address-cells =3D <3>; #size-cells =3D <2>; =20 - cpu_clk: clock-600000000 { - compatible =3D "fixed-clock"; - #clock-cells =3D <0>; - clock-frequency =3D <600000000>; /* CPU clock =3D 600MHz */ - }; - - ddr_clk: clock-30000000 { - compatible =3D "fixed-clock"; - #clock-cells =3D <0>; - clock-frequency =3D <30000000>; /* Fabric clock =3D 30MHz */ - }; - - sys_clk: clock-15625000 { - compatible =3D "fixed-clock"; - #clock-cells =3D <0>; - clock-frequency =3D <15625000>; /* System clock =3D 15.625MHz */ - }; - - pci-ep-bus@0 { - compatible =3D "simple-bus"; - #address-cells =3D <1>; - #size-cells =3D <1>; - - /* - * map @0xe2000000 (32MB) to BAR0 (CPU) - * map @0xe0000000 (16MB) to BAR1 (AMBA) - */ - ranges =3D <0xe2000000 0x00 0x00 0x00 0x2000000 - 0xe0000000 0x01 0x00 0x00 0x1000000>; - - switch: switch@e0000000 { - compatible =3D "microchip,lan966x-switch"; - reg =3D <0xe0000000 0x0100000>, - <0xe2000000 0x0800000>; - reg-names =3D "cpu", "gcb"; - - interrupt-parent =3D <&oic>; - interrupts =3D <12 IRQ_TYPE_LEVEL_HIGH>, - <9 IRQ_TYPE_LEVEL_HIGH>; - interrupt-names =3D "xtr", "ana"; - - resets =3D <&reset 0>; - reset-names =3D "switch"; - - pinctrl-names =3D "default"; - pinctrl-0 =3D <&tod_pins>; - - ethernet-ports { - #address-cells =3D <1>; - #size-cells =3D <0>; - - port0: port@0 { - phy-handle =3D <&lan966x_phy0>; - - reg =3D <0>; - phy-mode =3D "gmii"; - phys =3D <&serdes 0 CU(0)>; - }; - - port1: port@1 { - phy-handle =3D <&lan966x_phy1>; - - reg =3D <1>; - phy-mode =3D "gmii"; - phys =3D <&serdes 1 CU(1)>; - }; - }; - }; - - cpu_ctrl: syscon@e00c0000 { - compatible =3D "microchip,lan966x-cpu-syscon", "syscon"; - reg =3D <0xe00c0000 0xa8>; - }; - - oic: oic@e00c0120 { - compatible =3D "microchip,lan966x-oic"; - #interrupt-cells =3D <2>; - interrupt-controller; - interrupts =3D <0>; /* PCI INTx assigned interrupt */ - reg =3D <0xe00c0120 0x190>; - }; - - reset: reset@e200400c { - compatible =3D "microchip,lan966x-switch-reset"; - reg =3D <0xe200400c 0x4>, <0xe00c0000 0xa8>; - reg-names =3D "gcb","cpu"; - #reset-cells =3D <1>; - cpu-syscon =3D <&cpu_ctrl>; - }; - - gpio: pinctrl@e2004064 { - compatible =3D "microchip,lan966x-pinctrl"; - reg =3D <0xe2004064 0xb4>, - <0xe2010024 0x138>; - resets =3D <&reset 0>; - reset-names =3D "switch"; - gpio-controller; - #gpio-cells =3D <2>; - gpio-ranges =3D <&gpio 0 0 78>; - interrupt-parent =3D <&oic>; - interrupt-controller; - interrupts =3D <17 IRQ_TYPE_LEVEL_HIGH>; - #interrupt-cells =3D <2>; + #include "lan966x_pci.dtsi" + }; + }; +}; =20 - tod_pins: tod_pins { - pins =3D "GPIO_36"; - function =3D "ptpsync_1"; - }; +&gpio { + tod_pins: tod_pins { + pins =3D "GPIO_36"; + function =3D "ptpsync_1"; + }; +}; =20 - fc0_a_pins: fcb4-i2c-pins { - /* RXD, TXD */ - pins =3D "GPIO_9", "GPIO_10"; - function =3D "fc0_a"; - }; - }; +&lan966x_phy0 { + status =3D "okay"; +}; =20 - mdio1: mdio@e200413c { - #address-cells =3D <1>; - #size-cells =3D <0>; - compatible =3D "microchip,lan966x-miim"; - reg =3D <0xe200413c 0x24>, - <0xe2010020 0x4>; +&lan966x_phy1 { + status =3D "okay"; +}; =20 - resets =3D <&reset 0>; - reset-names =3D "switch"; +&mdio1 { + status =3D "okay"; +}; =20 - lan966x_phy0: ethernet-lan966x_phy@1 { - reg =3D <1>; - }; +&port0 { + phy-handle =3D <&lan966x_phy0>; + phy-mode =3D "gmii"; + phys =3D <&serdes 0 CU(0)>; + status =3D "okay"; +}; =20 - lan966x_phy1: ethernet-lan966x_phy@2 { - reg =3D <2>; - }; - }; +&port1 { + phy-handle =3D <&lan966x_phy1>; + phy-mode =3D "gmii"; + phys =3D <&serdes 1 CU(1)>; + status =3D "okay"; +}; =20 - serdes: serdes@e202c000 { - compatible =3D "microchip,lan966x-serdes"; - reg =3D <0xe202c000 0x9c>, - <0xe2004010 0x4>; - #phy-cells =3D <2>; - }; - }; - }; - }; +&switch { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&tod_pins>; + status =3D "okay"; }; --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ECFB940F8DA; Fri, 27 Feb 2026 14:01:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200904; cv=none; b=DRbx9Ca9KIbaidhMt8YhUTdgYlwpwdzXYio52jXGcRKq06ll9f38aE+ECvSDqdD3E5TQl//R+/UV3Ird5RKOxi1J+A/Ey16vea+ynzR7xPzAhxaAiP7R2aSLa1/ctxFZI0iYwnTvSfvEWiMMPi/jAJ8OpY/TTEn1PiA7bvxXYfY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200904; c=relaxed/simple; bh=Y8m0zsSKVad7SFcsm/ZKBnRFSzmHm9gWwA6ylq8UG0o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=erZUK8UYxG/fZJeGKziwwqhsSunEDdTjE0do8G3e1y1UB4XP3Iu3yd0p7/blmw8VMlH13NwVy66koBF1dvmWR8hPF9Jp9eKvCD6UbXMqSnWFWYAaFEbFBLRJsPbonHCaUPfEgMkKjoc4MjeXkSw7q38ETosZQcIKGhSeirRknpc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=bjbJZfZb; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="bjbJZfZb" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id CD0934E41912; Fri, 27 Feb 2026 14:01:41 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id A510D5FE74; Fri, 27 Feb 2026 14:01:41 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id DE6241036946F; Fri, 27 Feb 2026 15:01:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200894; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=xIgC4JqFpnspOBEpImL7CCr+SrfTGe6B79z1CKickA8=; b=bjbJZfZbKN3BZWuBk5p9zNyOZMGBmWhIH9WPpWzqebiOG+HdLMx+mraP6tupRW8GGjPuMr NVjNMer9qin2O/b5s/mzUgTqFRux8RSYdTcumc5+HhhG8UQruOwBYVEN+eKvwmhLZPMg1C tZzzCTMA/+D+ylWwxJRVPjFNbiOOIqmUXKIlAMeYmJ7nw2E7/0o0qxz65vKgPuPAuKQmUL p8rWm/nodgMg5g9hoPpd9hmkD+sllYcdIYo79MjJV9yZs1edO1jhq7LaSDJ7Jaw3HM9AcG +u7Y8kdBaMKaDUv2t2Y4G6nAyfWLVhVg4AiZlAinl/33GVwPpAJqZnG8V5mRJg== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 23/28] misc: lan966x_pci: Rename lan966x_pci.dtso to lan966x_evb_lan9662_nic.dtso Date: Fri, 27 Feb 2026 14:54:20 +0100 Message-ID: <20260227135428.783983-24-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" The lan966x_pci.dtso describes the Microchip EVB-LAN9662-NIC board [0] This PCI board embeds a LAN9962 PCI device chip, part of the LAN966x family. Rename the lan966x_pci.dtso accordingly. Link: https://www.microchip.com/en-us/development-tool/EV53U25A [0] Signed-off-by: Herve Codina Reviewed-by: Andrew Lunn --- MAINTAINERS | 2 +- drivers/misc/Makefile | 2 +- .../{lan966x_pci.dtso =3D> lan966x_evb_lan9662_nic.dtso} | 0 drivers/misc/lan966x_pci.c | 8 ++++---- 4 files changed, 6 insertions(+), 6 deletions(-) rename drivers/misc/{lan966x_pci.dtso =3D> lan966x_evb_lan9662_nic.dtso} (= 100%) diff --git a/MAINTAINERS b/MAINTAINERS index 441fe74e7ef7..2c5537891071 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -17304,9 +17304,9 @@ F: drivers/irqchip/irq-lan966x-oic.c MICROCHIP LAN966X PCI DRIVER M: Herve Codina S: Maintained +F: drivers/misc/lan966x_evb_lan9662_nic.dtso F: drivers/misc/lan966x_pci.c F: drivers/misc/lan966x_pci.dtsi -F: drivers/misc/lan966x_pci.dtso =20 MICROCHIP LAN969X ETHERNET DRIVER M: Daniel Machon diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index b32a2597d246..3b3a61f45ee9 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -70,7 +70,7 @@ obj-$(CONFIG_TPS6594_PFSM) +=3D tps6594-pfsm.o obj-$(CONFIG_NSM) +=3D nsm.o obj-$(CONFIG_MARVELL_CN10K_DPI) +=3D mrvl_cn10k_dpi.o lan966x-pci-objs :=3D lan966x_pci.o -lan966x-pci-objs +=3D lan966x_pci.dtbo.o +lan966x-pci-objs +=3D lan966x_evb_lan9662_nic.dtbo.o obj-$(CONFIG_MCHP_LAN966X_PCI) +=3D lan966x-pci.o obj-y +=3D keba/ obj-y +=3D amd-sbi/ diff --git a/drivers/misc/lan966x_pci.dtso b/drivers/misc/lan966x_evb_lan96= 62_nic.dtso similarity index 100% rename from drivers/misc/lan966x_pci.dtso rename to drivers/misc/lan966x_evb_lan9662_nic.dtso diff --git a/drivers/misc/lan966x_pci.c b/drivers/misc/lan966x_pci.c index 0bb90c0943bf..bbd87c89663d 100644 --- a/drivers/misc/lan966x_pci.c +++ b/drivers/misc/lan966x_pci.c @@ -19,8 +19,8 @@ #include =20 /* Embedded dtbo symbols created by cmd_wrap_S_dtb in scripts/Makefile.lib= */ -extern char __dtbo_lan966x_pci_begin[]; -extern char __dtbo_lan966x_pci_end[]; +extern char __dtbo_lan966x_evb_lan9662_nic_begin[]; +extern char __dtbo_lan966x_evb_lan9662_nic_end[]; =20 struct pci_dev_intr_ctrl { struct pci_dev *pci_dev; @@ -125,8 +125,8 @@ struct lan966x_pci { =20 static int lan966x_pci_load_overlay(struct lan966x_pci *data) { - u32 dtbo_size =3D __dtbo_lan966x_pci_end - __dtbo_lan966x_pci_begin; - void *dtbo_start =3D __dtbo_lan966x_pci_begin; + u32 dtbo_size =3D __dtbo_lan966x_evb_lan9662_nic_end - __dtbo_lan966x_evb= _lan9662_nic_begin; + void *dtbo_start =3D __dtbo_lan966x_evb_lan9662_nic_begin; =20 return of_overlay_fdt_apply(dtbo_start, dtbo_size, &data->ovcs_id, dev_of= _node(data->dev)); } --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E95C142188D; Fri, 27 Feb 2026 14:01:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200920; cv=none; b=Kt33HvODr8OicGRQdaJm/WTqTyNN7fObSpOc5ZTHnHDMhEb7GTJqMq9EJfA98R6eOHM1Pm+TmhviuXMBPRYVMNNZ5MT4AQggm3uvREd2yVlk+7wZIiSHZuCsC1U+Q5SnLJENURSIo6i2G3QCZm+i/m5nCeCtgEXM7DQ73cyYoSM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200920; c=relaxed/simple; bh=WDPFl6m6bRz8Thl6Qu9+NScWd7/JsGzUXYclLG80RUY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NTZz5qb05A1JsR0J6ca2sW0RUrp9FlR0JNpjWPyxtrrSKa3YAnbVoTmPZRmg3h9S2oUoGx023URsjwkmawS75M5ew7u54j1WbKSg1lEhg0FrEpirDy5tM38n8nvX2MXohpUnaJzUFSUJG9F42Lj3qYyYvbma+OIVFcUZM4mlyRw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=ohBR7/UH; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="ohBR7/UH" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id ACB0E4E411FB; Fri, 27 Feb 2026 14:01:57 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 7D3CA5FE46; Fri, 27 Feb 2026 14:01:57 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 616F410369467; Fri, 27 Feb 2026 15:01:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200914; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=oI3ulT6gceg7nbKUJ1bD8cGXzZxk2WnR3vcjhMGr/6Y=; b=ohBR7/UHsitSVsIPIWYhwUcUf8TdIi+PVmFmcHuO/m20CaTkhjZ7tMQlkyks1qTmoTN2pT /XwloStn0bR+uQYVDVTYWqocE888Z1PAUcgW6km88cH7nvZl2TVIahbihEunGA8f+q2fpD ehduZNxpK3PgXnSuJ9kiRzA8bObqAEch7xfoRkMKCc8BCUa5oi66PBRAcrpvDuk3dSZ8IB 7iAlzXLyRe3jPRAt3ZKqfEEQyYWgcZsQmnLJdsoFdlkzPhcIgS+DiLFdC00/PQ7+DnywFx 8uyNYlw7yQa2yl/EeeFsDZrdISnj5G7WmgOW+hRavNccxFfzb5UY/n1kfC3nJw== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 24/28] PCI: Add Microchip LAN9662 PCI Device ID Date: Fri, 27 Feb 2026 14:54:21 +0100 Message-ID: <20260227135428.783983-25-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" Existing code uses the 0x9660 value (LAN9662 PCI Device ID) in several places. Avoid this direct use of the 0x9660 value replacing it by defined PCI Device ID. Signed-off-by: Herve Codina Acked-by: Bjorn Helgaas --- drivers/misc/lan966x_pci.c | 2 +- drivers/pci/quirks.c | 2 +- include/linux/pci_ids.h | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/misc/lan966x_pci.c b/drivers/misc/lan966x_pci.c index bbd87c89663d..e6d1fce0b116 100644 --- a/drivers/misc/lan966x_pci.c +++ b/drivers/misc/lan966x_pci.c @@ -197,7 +197,7 @@ static void lan966x_pci_remove(struct pci_dev *pdev) } =20 static struct pci_device_id lan966x_pci_ids[] =3D { - { PCI_DEVICE(PCI_VENDOR_ID_EFAR, 0x9660) }, + { PCI_DEVICE(PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_LAN9662) }, { } }; MODULE_DEVICE_TABLE(pci, lan966x_pci_ids); diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index a63c24d3901d..cdb81f90f91f 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -6358,7 +6358,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0xa76e,= dpc_log_size); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_XILINX, 0x5020, of_pci_make_dev_node= ); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_XILINX, 0x5021, of_pci_make_dev_node= ); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_REDHAT, 0x0005, of_pci_make_dev_node= ); -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_EFAR, 0x9660, of_pci_make_dev_node); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_LAN9662, of= _pci_make_dev_node); =20 /* * Devices known to require a longer delay before first config space access diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 406abf629be2..766684176a51 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -934,6 +934,7 @@ #define PCI_VENDOR_ID_EFAR 0x1055 #define PCI_DEVICE_ID_EFAR_SLC90E66_1 0x9130 #define PCI_DEVICE_ID_EFAR_SLC90E66_3 0x9463 +#define PCI_DEVICE_ID_EFAR_LAN9662 0x9660 =20 #define PCI_VENDOR_ID_MOTOROLA 0x1057 #define PCI_DEVICE_ID_MOTOROLA_MPC105 0x0001 --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7FD21421896; Fri, 27 Feb 2026 14:02:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200938; cv=none; b=ifV4sNsQQsrMCNxJVg0NxFsFzofCb8fwbL4H96P0Q1jzkXvRadXFwhz/wAjheU23A8RO18oJbKCHk+ghmNTPUfCsG28bnpwnrAhu5/h13rRz176AOhFdabqIry6iU0Ths/T068LLYWX4WQQHfuhwb2rl7s2HXnnLdIRL6y5mfM0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200938; c=relaxed/simple; bh=NTK3i5tT9QWPEOEZ2JcdNqTuIHC5BhBkEo4P1dG/bNY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=C/9GyPEk7cjhVMBSK3iZx3wsHGvc+2FfS77rSZyFaGv1zf7Wj23H8OUz1cQ7SqvZXuZNBRZ77g6x9Kb6QPL0HkbCrH8NyEQgqhCCw5Ryv6HTnPZr3xRd6TNso5uns/Bh4Fy9EDbA+xq1lD3hfAWX5wa8XdkygrWn1BJA7pKBR5g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=hgPdNY1e; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="hgPdNY1e" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 5342B4E411FB; Fri, 27 Feb 2026 14:02:15 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 2A4805FE74; Fri, 27 Feb 2026 14:02:15 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id C11261036946A; Fri, 27 Feb 2026 15:01:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200930; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=dyU2PMsXAmj3EbT2+UZQ+YSlvbKU0N9ZIMJJlxdw490=; b=hgPdNY1epJFmWUUcKpP0uBDbcIe1BWXcfKoYCIpkPBH3z90bmPhZRren578yNJ2SWXn9wQ HYKjIXu/wG09r9j4+wEEHxsJiitX9YM1VEekQODoG7Sr2RrNP3tN1aBkMsIYmjyp9pVK7I aY6BbRf0Tsx8TjcrRrmwajRCf3Ot/kfZAmULFn3YOC2yQOyI2Qmeh7KPYR7IGpVdxNWTEM X+tML3CBs+4vuzfs2ePzNe5QvJPjmpTo1EPNjNq4+xFKHg1ousNpdTIGL1j4lToTWdCeNq bKKNylJ49ukAgvC5Qf0PLuUMJuVj9OiWpWDNJVeV7swyNNxRv96XUTzpfUE5eA== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 25/28] misc: lan966x_pci: Introduce board specific data Date: Fri, 27 Feb 2026 14:54:22 +0100 Message-ID: <20260227135428.783983-26-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" Only one device-tree overlay (lan966x_evb_lan9662_nic.dtbo) is handled and this overlay is directly referenced in lan966x_pci_load_overlay(). This avoid to use the code for an other board. In order to be more generic and to allow support for other boards (PCI Vendor/Device IDs), introduce the lan966x_pci_info structure and attach it to PCI Vendor/Device IDs handled by the driver. This structure contains information related to the PCI board such as information related to the dtbo describing the board we have to load. Signed-off-by: Herve Codina Reviewed-by: Andrew Lunn --- drivers/misc/lan966x_pci.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/drivers/misc/lan966x_pci.c b/drivers/misc/lan966x_pci.c index e6d1fce0b116..041e92f924c4 100644 --- a/drivers/misc/lan966x_pci.c +++ b/drivers/misc/lan966x_pci.c @@ -18,10 +18,6 @@ #include #include =20 -/* Embedded dtbo symbols created by cmd_wrap_S_dtb in scripts/Makefile.lib= */ -extern char __dtbo_lan966x_evb_lan9662_nic_begin[]; -extern char __dtbo_lan966x_evb_lan9662_nic_end[]; - struct pci_dev_intr_ctrl { struct pci_dev *pci_dev; struct irq_domain *irq_domain; @@ -118,17 +114,23 @@ static int devm_pci_dev_create_intr_ctrl(struct pci_d= ev *pdev) return devm_add_action_or_reset(&pdev->dev, devm_pci_dev_remove_intr_ctrl= , intr_ctrl); } =20 +struct lan966x_pci_info { + void *dtbo_begin; + void *dtbo_end; +}; + struct lan966x_pci { struct device *dev; int ovcs_id; + const struct lan966x_pci_info *info; }; =20 static int lan966x_pci_load_overlay(struct lan966x_pci *data) { - u32 dtbo_size =3D __dtbo_lan966x_evb_lan9662_nic_end - __dtbo_lan966x_evb= _lan9662_nic_begin; - void *dtbo_start =3D __dtbo_lan966x_evb_lan9662_nic_begin; + const struct lan966x_pci_info *info =3D data->info; =20 - return of_overlay_fdt_apply(dtbo_start, dtbo_size, &data->ovcs_id, dev_of= _node(data->dev)); + return of_overlay_fdt_apply(info->dtbo_begin, info->dtbo_end - info->dtbo= _begin, + &data->ovcs_id, dev_of_node(data->dev)); } =20 static void lan966x_pci_unload_overlay(struct lan966x_pci *data) @@ -169,6 +171,9 @@ static int lan966x_pci_probe(struct pci_dev *pdev, cons= t struct pci_device_id *i =20 pci_set_drvdata(pdev, data); data->dev =3D dev; + data->info =3D (const struct lan966x_pci_info *)id->driver_data; + if (!data->info) + return -EINVAL; =20 ret =3D lan966x_pci_load_overlay(data); if (ret) @@ -196,8 +201,17 @@ static void lan966x_pci_remove(struct pci_dev *pdev) lan966x_pci_unload_overlay(data); } =20 +/* Embedded dtbo symbols created by cmd_wrap_S_dtb in scripts/Makefile.lib= */ +extern char __dtbo_lan966x_evb_lan9662_nic_begin[]; +extern char __dtbo_lan966x_evb_lan9662_nic_end[]; + +static struct lan966x_pci_info evb_lan9662_nic_info =3D { + .dtbo_begin =3D __dtbo_lan966x_evb_lan9662_nic_begin, + .dtbo_end =3D __dtbo_lan966x_evb_lan9662_nic_end, +}; + static struct pci_device_id lan966x_pci_ids[] =3D { - { PCI_DEVICE(PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_LAN9662) }, + { PCI_DEVICE_DATA(EFAR, LAN9662, &evb_lan9662_nic_info) }, { } }; MODULE_DEVICE_TABLE(pci, lan966x_pci_ids); --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 87BBA423A78; Fri, 27 Feb 2026 14:02:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200956; cv=none; b=bApsIwdJguK47yN4VKoGfw1YoeAHvKirJ8N9d03aqq+wwr7z4irlXUQfblX2N9YFnEDhtXREqJc24hkIUJBir6tN3vYNG9F3A7m3RhA9jZC/qa75Ph9S+mhHsREE0wxFEEbzLU6/bYLvgbW0IS4qs84vu7hPzuPXRl74FTzB00A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200956; c=relaxed/simple; bh=xmLqHbZKT2Cv/CWmcreGU77H12f7Xun8iJll/1MC4EU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DfhqotgUGwR9TADDZnr4xGwkEsudlvXkHE1Q3XA3Dwd5QhpeWWG23mFjEMaCtxqPKmckjmYq6WFQdTb1oFZg7oqbP11GvLT/IGYiw4DqD3DtI/gIaDzNgNl41ffNM5pghSNyZTcP2+2SzdfPbZmk4g3hjzT0dZQ5MLH8gimLtYk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=UfO44clo; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="UfO44clo" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 5FAEE1A1B17; Fri, 27 Feb 2026 14:02:33 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 33FBE5FE46; Fri, 27 Feb 2026 14:02:33 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id B74021036944D; Fri, 27 Feb 2026 15:02:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200949; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=gX4rEvCiby9B2yvI++vEu3sfDTTG+/1csPgc0WEGIYs=; b=UfO44cloo5Kb5sjfe1DtwGp8kSrPzUcq1tqFW2iZCRa5SWccGZE7mkodmPuk95KzuEP3Dg bvhOR0nafZ7IR73RJqM+4PEj4U85H1qLeonwG8su9wKTLlDfyMZvIN64Pjhg8Cmr0zmg/K Be4lhof6Cg+BqSCQn6E/xvH6nF+hPxq6ETSlPT/SKVEccCAUM4jvlov2CYgBlIn+7ZmQZ+ T70SHNKXkJXLgLMckwXCGTkn+0Pfx1/zXnHq04UKvlGy/rH/dtTsQ7cHBIh/yHNoVqy/u9 7mKmP2tyCM5lPKkhKkH5kFT5fsjUBtWq9GdQc9p8sNpV+sXDIRKTHdZDQFhGAg== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 26/28] misc: lan966x_pci: Add dtsi/dtso nodes in order to support SFPs Date: Fri, 27 Feb 2026 14:54:23 +0100 Message-ID: <20260227135428.783983-27-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" Add device-tree nodes needed to support SFPs. Those nodes are: - the clock controller - the i2c controller - the i2c mux - the SFPs themselves and their related ports in the switch Signed-off-by: Herve Codina --- drivers/misc/lan966x_evb_lan9662_nic.dtso | 96 +++++++++++++++++++++++ drivers/misc/lan966x_pci.dtsi | 42 ++++++++++ 2 files changed, 138 insertions(+) diff --git a/drivers/misc/lan966x_evb_lan9662_nic.dtso b/drivers/misc/lan96= 6x_evb_lan9662_nic.dtso index 3ad50abee72d..20e1fe4f78bf 100644 --- a/drivers/misc/lan966x_evb_lan9662_nic.dtso +++ b/drivers/misc/lan966x_evb_lan9662_nic.dtso @@ -4,6 +4,7 @@ */ =20 #include +#include #include =20 /dts-v1/; @@ -27,15 +28,94 @@ __overlay__ { #size-cells =3D <2>; =20 #include "lan966x_pci.dtsi" + + i2c0_emux: i2c0-emux { + compatible =3D "i2c-mux-pinctrl"; + #address-cells =3D <1>; + #size-cells =3D <0>; + i2c-parent =3D <&i2c0>; + pinctrl-names =3D "i2c102", "i2c103", "idle"; + pinctrl-0 =3D <&i2cmux_0>; + pinctrl-1 =3D <&i2cmux_1>; + pinctrl-2 =3D <&i2cmux_pins>; + + i2c102: i2c@0 { + reg =3D <0>; + #address-cells =3D <1>; + #size-cells =3D <0>; + }; + + i2c103: i2c@1 { + reg =3D <1>; + #address-cells =3D <1>; + #size-cells =3D <0>; + }; + }; + + sfp2: sfp2 { + compatible =3D "sff,sfp"; + i2c-bus =3D <&i2c102>; + tx-disable-gpios =3D <&gpio 0 GPIO_ACTIVE_HIGH>; + los-gpios =3D <&gpio 25 GPIO_ACTIVE_HIGH>; + mod-def0-gpios =3D <&gpio 18 GPIO_ACTIVE_LOW>; + tx-fault-gpios =3D <&gpio 2 GPIO_ACTIVE_HIGH>; + }; + + sfp3: sfp3 { + compatible =3D "sff,sfp"; + i2c-bus =3D <&i2c103>; + tx-disable-gpios =3D <&gpio 1 GPIO_ACTIVE_HIGH>; + los-gpios =3D <&gpio 26 GPIO_ACTIVE_HIGH>; + mod-def0-gpios =3D <&gpio 19 GPIO_ACTIVE_LOW>; + tx-fault-gpios =3D <&gpio 3 GPIO_ACTIVE_HIGH>; + }; }; }; }; =20 +&flx0 { + atmel,flexcom-mode =3D ; + status =3D "okay"; +}; + +&i2c0 { + pinctrl-0 =3D <&fc0_a_pins>; + pinctrl-names =3D "default"; + i2c-analog-filter; + i2c-digital-filter; + i2c-digital-filter-width-ns =3D <35>; + status =3D "okay"; +}; + &gpio { tod_pins: tod_pins { pins =3D "GPIO_36"; function =3D "ptpsync_1"; }; + + fc0_a_pins: fcb4-i2c-pins { + /* RXD, TXD */ + pins =3D "GPIO_9", "GPIO_10"; + function =3D "fc0_a"; + }; + + i2cmux_pins: i2cmux-pins { + pins =3D "GPIO_76", "GPIO_77"; + function =3D "twi_slc_gate"; + output-low; + }; + + i2cmux_0: i2cmux-0 { + pins =3D "GPIO_76"; + function =3D "twi_slc_gate"; + output-high; + }; + + i2cmux_1: i2cmux-1 { + pins =3D "GPIO_77"; + function =3D "twi_slc_gate"; + output-high; + }; }; =20 &lan966x_phy0 { @@ -64,6 +144,22 @@ &port1 { status =3D "okay"; }; =20 +&port2 { + phy-mode =3D "sgmii"; + phys =3D <&serdes 2 SERDES6G(0)>; + sfp =3D <&sfp2>; + managed =3D "in-band-status"; + status =3D "okay"; +}; + +&port3 { + phy-mode =3D "sgmii"; + phys =3D <&serdes 3 SERDES6G(1)>; + sfp =3D <&sfp3>; + managed =3D "in-band-status"; + status =3D "okay"; +}; + &switch { pinctrl-names =3D "default"; pinctrl-0 =3D <&tod_pins>; diff --git a/drivers/misc/lan966x_pci.dtsi b/drivers/misc/lan966x_pci.dtsi index 170298084fa5..d5c2056e4e5c 100644 --- a/drivers/misc/lan966x_pci.dtsi +++ b/drivers/misc/lan966x_pci.dtsi @@ -3,6 +3,7 @@ * Copyright (C) 2025 Microchip UNG */ =20 +#include #include =20 cpu_clk: clock-600000000 { @@ -61,6 +62,39 @@ port1: port@1 { reg =3D <1>; status =3D "disabled"; }; + + port2: port@2 { + reg =3D <2>; + status =3D "disabled"; + }; + + port3: port@3 { + reg =3D <3>; + status =3D "disabled"; + }; + }; + }; + + flx0: flexcom@e0040000 { + compatible =3D "atmel,sama5d2-flexcom"; + reg =3D <0xe0040000 0x100>; + clocks =3D <&clks GCK_ID_FLEXCOM0>; + #address-cells =3D <1>; + #size-cells =3D <1>; + ranges =3D <0x0 0xe0040000 0x800>; + status =3D "disabled"; + + i2c0: i2c@600 { + compatible =3D "microchip,sam9x60-i2c"; + reg =3D <0x600 0x200>; + interrupt-parent =3D <&oic>; + interrupts =3D <48 IRQ_TYPE_LEVEL_HIGH>; + #address-cells =3D <1>; + #size-cells =3D <0>; + clocks =3D <&clks GCK_ID_FLEXCOM0>; + assigned-clocks =3D <&clks GCK_ID_FLEXCOM0>; + assigned-clock-rates =3D <20000000>; + status =3D "disabled"; }; }; =20 @@ -69,6 +103,14 @@ cpu_ctrl: syscon@e00c0000 { reg =3D <0xe00c0000 0xa8>; }; =20 + clks: clock-controller@e00c00a8 { + compatible =3D "microchip,lan966x-gck"; + #clock-cells =3D <1>; + clocks =3D <&cpu_clk>, <&ddr_clk>, <&sys_clk>; + clock-names =3D "cpu", "ddr", "sys"; + reg =3D <0xe00c00a8 0x38>, <0xe00c02cc 0x4>; + }; + oic: oic@e00c0120 { compatible =3D "microchip,lan966x-oic"; #interrupt-cells =3D <2>; --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B03C42883D; Fri, 27 Feb 2026 14:02:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200972; cv=none; b=hhViYmCfFmRNMGEdgNryVO9OB4QJ+FtLnUgE1q5CUFf5zL6VaNJf2PJIrGWJCorJU2f/XYtmLYw6MzETPNGzml4gysrkPWa6uFTWnuPIWvt6049Y0jehRqWVPiA+1PsGXeJlBdYhC6EmIEp2wyQDLKEqBuz5DPW1OhNGutwOGXw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200972; c=relaxed/simple; bh=SsD09xOCQ2lgSQj/n0w/ZoUczDXfNByivtOBGWXEmt8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=e5WbmzsDsL+K1FsWhS7mOZFJ1yUlQMArdpOG0Kn7xqc07OKcCDzn4jGWruj/tlVTrqd/Oxw0pQNMlXMVqlyjTxy6QlxOnCT/R4Dw4MBI3huWLRJ8Lbd5jJh0wTwBOq98m26ayAe9LjO9bdxk4wJZwL12YqxCknptz1pN6SNG1BE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=m4t7l6CL; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="m4t7l6CL" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 10C0DC406A4; Fri, 27 Feb 2026 14:03:06 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 2D0455FE74; Fri, 27 Feb 2026 14:02:50 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id A5A8B10369455; Fri, 27 Feb 2026 15:02:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200967; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=Q13pHLbTNQd/5Auc3jF+bDsxwBJ2OfItINqgqY+fL/8=; b=m4t7l6CLBBA9iTTCOyPpqIu/Jtq4asiz5+LxtMLuGbi1rWAr5+NuAo+0JE893eyPpWBXnX 1JyHY30KY9ekk58yW31RhKOdn0jDjJhOiDeQTl8qGViJIw3Zo/z0JqtnV3AKjQQUm4KCrj CtG58IDJuSXdxVfdIYAV3kCfYZAfyuE7iGFfkuNGQLVJpT7eax6BBVmfqWwBngGwedq+w4 rCWsWWvZ+eglBoCp24F7kUea/YLTYyv8hFSeqbvsIHwk/J4qygbwowdhRy8vxiHZ1TS3XG 1Raamvfi5wD5+zE6bZiwCJQn7/VTUIWzWWmbYsAA3ZChS8kFYtSmUddjg274EQ== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 27/28] misc: lan966x_pci: Sort the drivers list in Kconfig help Date: Fri, 27 Feb 2026 14:54:24 +0100 Message-ID: <20260227135428.783983-28-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" The LAN966X Kconfig help section mentions drivers related to devices. Sort this list alphabetically. Signed-off-by: Herve Codina --- drivers/misc/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 5cc79d1517af..9c285a7c88ba 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -635,13 +635,13 @@ config MCHP_LAN966X_PCI Even if this driver does not depend on those other drivers, in order to have a fully functional board, the following drivers are needed: - fixed-clock (COMMON_CLK) - - lan966x-oic (LAN966X_OIC) - lan966x-cpu-syscon (MFD_SYSCON) - - lan966x-switch-reset (RESET_MCHP_SPARX5) + - lan966x-miim (MDIO_MSCC_MIIM) + - lan966x-oic (LAN966X_OIC) - lan966x-pinctrl (PINCTRL_OCELOT) - lan966x-serdes (PHY_LAN966X_SERDES) - - lan966x-miim (MDIO_MSCC_MIIM) - lan966x-switch (LAN966X_SWITCH) + - lan966x-switch-reset (RESET_MCHP_SPARX5) =20 source "drivers/misc/c2port/Kconfig" source "drivers/misc/eeprom/Kconfig" --=20 2.53.0 From nobody Tue Apr 7 18:51:41 2026 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 147E9332618; Fri, 27 Feb 2026 14:03:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200993; cv=none; b=tdiBaWm2jAV0MRLTTltE2FIec+oA0V0fXUVqUY4VnkuHBdgHjpgHWbn06HwXivN/HgBowssfIeLeZrUbjkBFrx9ExaXLNtPA6EC9Tnv/Fj0KSZKya9GZKpt1Ma57IfAdi24L8nS5U17oRWsMVSuyATFlCcCx0FQJ+T4vNQC0khc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200993; c=relaxed/simple; bh=jT14jpW+74aFxWT5k0JsiKiyPP15AQVRZS7/5fdgNS0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uP71fvleiXly7fmRLuqZg5xRqwlLPEYH4uTnNrW7/I26Vg2q9tqqgMnaY5K5mVFKtlVDg6mCEw2wUgLOWCHUt25ZIW1reZrwxw9AG6lcw3GvheOBiakSAxGWx+iBVGQiYbezr/KA0ak9qVgpbQe+jNEDcWzYWO8fs9/Y5kfX3jg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=UJTMWavT; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="UJTMWavT" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 014EC1A1B17; Fri, 27 Feb 2026 14:03:10 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id C97065FE46; Fri, 27 Feb 2026 14:03:09 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 13EAB1036946C; Fri, 27 Feb 2026 15:02:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200986; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=JD+Fs5XfMyLydBRoehNihG/5lsm5NM0S4zMf8NGpirs=; b=UJTMWavTrQZj4uGo3x/IOTThbijDw6KGvh6HO1NhCQpo0ef2dKJiWyO39VTLHbjFI+WpRH P0RqrvS8K+KANgpm1dFbGQ/wxc8J1RWrupAlddncc7UaeVgIGrwyY/F7k+3Gdh0L7K50sG aCTcm+PD9mPPXfbCBsR3iUp/SCfl1rAlJAp3Y/uLsSHS0WgfLhX0U/ngFZHJBLbFDtxHCS JAYU93X/n4HJYHW+iRGTXMI7x10nVff6ZA18dXf+W6c3JsE+3pGsyh6XV750WwoJicJ8pS mZ3hcO4ci2o0IBN3qGnB6KXLT3yMJCn4hqAZCHHou+kR4LsTaE2yy+MC4vFMDw== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 28/28] misc: lan966x_pci: Add drivers needed to support SFPs in Kconfig help Date: Fri, 27 Feb 2026 14:54:25 +0100 Message-ID: <20260227135428.783983-29-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" Recently, new device-tree nodes were added in the overlay to add support for SFPs on LAN966x PCI device. The LAN966X Kconfig help section mentions drivers related to devices added based on the overlay description. Add drivers related to devices described by those new nodes in the already existing driver list. Signed-off-by: Herve Codina --- drivers/misc/Kconfig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 9c285a7c88ba..69825dc0f85e 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -635,13 +635,18 @@ config MCHP_LAN966X_PCI Even if this driver does not depend on those other drivers, in order to have a fully functional board, the following drivers are needed: - fixed-clock (COMMON_CLK) + - i2c-mux-pinctrl (I2C_MUX_PINCTRL) - lan966x-cpu-syscon (MFD_SYSCON) + - lan966x-gck (COMMON_CLK_LAN966X) - lan966x-miim (MDIO_MSCC_MIIM) - lan966x-oic (LAN966X_OIC) - lan966x-pinctrl (PINCTRL_OCELOT) - lan966x-serdes (PHY_LAN966X_SERDES) - lan966x-switch (LAN966X_SWITCH) - lan966x-switch-reset (RESET_MCHP_SPARX5) + - sam9x60-i2c (I2C_AT91) + - sama5d2-flexcom (MFD_ATMEL_FLEXCOM) + - sfp (SFP) =20 source "drivers/misc/c2port/Kconfig" source "drivers/misc/eeprom/Kconfig" --=20 2.53.0