From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Cc: "Lee Jones" <lee@kernel.org>,
"Mark Brown" <broonie@opensource.wolfsonmicro.com>,
"Thierry Reding" <thierry.reding@avionic-design.de>,
"Sebastian Hesselbarth" <sebastian.hesselbarth@gmail.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Srinivas Kandagatla" <srini@kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Vinod Koul" <vkoul@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Danilo Krummrich" <dakr@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Saravana Kannan" <saravanak@kernel.org>,
"Madhavan Srinivasan" <maddy@linux.ibm.com>,
"Michael Ellerman" <mpe@ellerman.id.au>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
"Andi Shyti" <andi.shyti@kernel.org>,
"Joerg Roedel" <joro@8bytes.org>, "Will Deacon" <will@kernel.org>,
"Robin Murphy" <robin.murphy@arm.com>,
"Doug Berger" <opendmb@gmail.com>,
"Florian Fainelli" <florian.fainelli@broadcom.com>,
"Broadcom internal kernel review list"
<bcm-kernel-feedback-list@broadcom.com>,
"Ulf Hansson" <ulfh@kernel.org>, "Frank Li" <Frank.Li@nxp.com>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Fabio Estevam" <festevam@gmail.com>,
"Matthew Brost" <matthew.brost@intel.com>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Peter Chen" <peter.chen@kernel.org>,
"Paul Cercueil" <paul@crapouillou.net>, "Bin Liu" <b-liu@ti.com>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
"Maximilian Luz" <luzmaximilian@gmail.com>,
"Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
brgl@kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-sound@vger.kernel.org, driver-core@lists.linux.dev,
devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-i2c@vger.kernel.org, iommu@lists.linux.dev,
linux-pm@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-usb@vger.kernel.org, linux-mips@vger.kernel.org,
platform-driver-x86@vger.kernel.org, stable@vger.kernel.org,
"Wolfram Sang" <wsa+renesas@sang-engineering.com>
Subject: Re: [PATCH v2 00/19] driver core: count references of the platform device's fwnode, not OF node
Date: Mon, 29 Jun 2026 19:23:00 +0300 [thread overview]
Message-ID: <akKb5LPBIMenF9yD@ashevche-desk.local> (raw)
In-Reply-To: <20260629-pdev-fwnode-ref-v2-0-8abe2513f96e@oss.qualcomm.com>
On Mon, Jun 29, 2026 at 11:12:23AM +0200, Bartosz Golaszewski wrote:
> Platform device core provides helper interfaces for dealing with
> dynamically created platform devices. Most users should use
> platform_device_register_full() which encapsulates most of the
> operations but some modules will want to use the split approach of
> calling platform_device_alloc() + platform_device_add() separately for
> various reasons.
>
> With many platform devices now using dynamic software nodes as their
> primary firmware nodes and with the platform device interface being
> extended to also better cover the use-cases of secondary software nodes,
> I believe it makes sense to switch to counting the references of all
> kinds of firmware nodes.
>
> To that end, I identified all users of platform_device_alloc() that also
> assign dev.of_node or dev.fwnode manually. I noticed five cases where
> the references are not increased as they should (patches 1-5 fix these
> users) and provided three new functions in platform_device.h that now
> become the preferred interfaces for assigning firmware nodes to dynamic
> platform devices (in line with platform_device_add_data(),
> platform_device_add_resources(), etc.). The bulk of the patches in this
> series are small driver conversions to port all users to going through
> the new functions that now encapsulate the refcount logic. With that
> done, the final patch seamlessly switches to counting the references of
> all firmware node types.
>
> This effort is prerequisite of removing platform_device_release_full()
> and unifying the release path for dynamic platform devices using
> unmanaged software nodes.
>
> Merging strategy: The entire series should go through the driver core
> tree, possibly with an immutable branch provided to solve any potential
> conflicts though these are rather unlikely.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
for patches 2-4 assuming they will be accompanied with patch 19 at the same
time.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-06-29 16:23 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-29 9:12 [PATCH v2 00/19] driver core: count references of the platform device's fwnode, not OF node Bartosz Golaszewski
2026-06-29 9:12 ` [PATCH v2 01/19] powerpc/powermac: fix OF node refcount Bartosz Golaszewski
2026-06-29 9:12 ` [PATCH v2 02/19] driver core: platform: provide platform_device_set_of_node() Bartosz Golaszewski
2026-06-30 9:18 ` sashiko-bot
2026-06-30 11:37 ` Manuel Ebner
2026-06-30 13:22 ` Bartosz Golaszewski
2026-07-01 15:05 ` Manuel Ebner
2026-06-29 9:12 ` [PATCH v2 03/19] driver core: platform: provide platform_device_set_fwnode() Bartosz Golaszewski
2026-06-29 9:12 ` [PATCH v2 04/19] driver core: platform: provide platform_device_set_of_node_from_dev() Bartosz Golaszewski
2026-06-29 9:12 ` [PATCH v2 05/19] of: platform: use platform_device_set_of_node() Bartosz Golaszewski
2026-06-29 9:12 ` [PATCH v2 06/19] powerpc/powermac: " Bartosz Golaszewski
2026-06-29 9:12 ` [PATCH v2 07/19] i2c: pxa-pci: " Bartosz Golaszewski
2026-06-30 9:18 ` sashiko-bot
2026-06-29 9:12 ` [PATCH v2 08/19] iommu/fsl: " Bartosz Golaszewski
2026-06-29 14:08 ` Frank Li
2026-06-29 9:12 ` [PATCH v2 09/19] net: bcmgenet: " Bartosz Golaszewski
2026-06-29 23:15 ` Jakub Kicinski
2026-06-30 9:18 ` sashiko-bot
2026-06-29 9:12 ` [PATCH v2 10/19] pmdomain: imx: " Bartosz Golaszewski
2026-06-30 9:18 ` sashiko-bot
2026-06-30 15:27 ` Frank Li
2026-06-29 9:12 ` [PATCH v2 11/19] mfd: tps6586: " Bartosz Golaszewski
2026-06-29 9:12 ` [PATCH v2 12/19] slimbus: qcom-ngd-ctrl: " Bartosz Golaszewski
2026-06-29 9:25 ` Konrad Dybcio
2026-06-29 9:12 ` [PATCH v2 13/19] net: mv643xx: " Bartosz Golaszewski
2026-06-29 23:16 ` Jakub Kicinski
2026-06-29 9:12 ` [PATCH v2 14/19] drm/xe/i2c: use platform_device_set_fwnode() Bartosz Golaszewski
2026-06-30 9:18 ` sashiko-bot
2026-06-29 9:12 ` [PATCH v2 15/19] platform/surface: gpe: " Bartosz Golaszewski
2026-06-29 9:12 ` [PATCH v2 16/19] usb: chipidea: use platform_device_set_of_node_from_dev() Bartosz Golaszewski
2026-06-29 9:12 ` [PATCH v2 17/19] usb: musb: " Bartosz Golaszewski
2026-06-30 9:18 ` sashiko-bot
2026-06-29 9:12 ` [PATCH v2 18/19] reset: rzg2l: " Bartosz Golaszewski
2026-06-29 9:12 ` [PATCH v2 19/19] driver core: platform: count references to all kinds of firmware nodes Bartosz Golaszewski
2026-06-29 16:21 ` Andy Shevchenko
2026-06-30 9:18 ` sashiko-bot
2026-06-29 16:23 ` Andy Shevchenko [this message]
2026-06-29 23:20 ` ✓ CI.KUnit: success for driver core: count references of the platform device's fwnode, not OF node (rev2) Patchwork
2026-06-30 0:24 ` ✓ Xe.CI.BAT: " Patchwork
2026-06-30 12:47 ` ✓ Xe.CI.FULL: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=akKb5LPBIMenF9yD@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=Frank.Li@nxp.com \
--cc=airlied@gmail.com \
--cc=andi.shyti@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=b-liu@ti.com \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=benh@kernel.crashing.org \
--cc=brgl@kernel.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=chleroy@kernel.org \
--cc=dakr@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=driver-core@lists.linux.dev \
--cc=edumazet@google.com \
--cc=festevam@gmail.com \
--cc=florian.fainelli@broadcom.com \
--cc=gregkh@linuxfoundation.org \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=imx@lists.linux.dev \
--cc=intel-xe@lists.freedesktop.org \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=kernel@pengutronix.de \
--cc=krzk@kernel.org \
--cc=kuba@kernel.org \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=luzmaximilian@gmail.com \
--cc=maddy@linux.ibm.com \
--cc=matthew.brost@intel.com \
--cc=mpe@ellerman.id.au \
--cc=netdev@vger.kernel.org \
--cc=npiggin@gmail.com \
--cc=opendmb@gmail.com \
--cc=p.zabel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=paul@crapouillou.net \
--cc=peter.chen@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=robin.murphy@arm.com \
--cc=rodrigo.vivi@intel.com \
--cc=s.hauer@pengutronix.de \
--cc=saravanak@kernel.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=simona@ffwll.ch \
--cc=srini@kernel.org \
--cc=stable@vger.kernel.org \
--cc=thierry.reding@avionic-design.de \
--cc=thomas.hellstrom@linux.intel.com \
--cc=ulfh@kernel.org \
--cc=vkoul@kernel.org \
--cc=will@kernel.org \
--cc=wsa+renesas@sang-engineering.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.