Thread (57 messages) 57 messages, 14 authors, 5d ago

Re: [PATCH 08/23] driver core: platform: provide platform_device_set_of_node_from_dev()

From: Johan Hovold <johan@kernel.org>
Date: 2026-06-08 07:03:05
Also in: dri-devel, driver-core, imx, intel-xe, linux-arm-msm, linux-devicetree, linux-i2c, linux-iommu, linux-mips, linux-pm, linux-sound, linux-usb, lkml, netdev, platform-driver-x86

On Fri, Jun 05, 2026 at 05:53:04PM +0300, Andy Shevchenko wrote:
On Fri, Jun 05, 2026 at 02:16:17PM +0200, Johan Hovold wrote:
quoted
On Wed, Jun 03, 2026 at 12:44:55AM +0300, Andy Shevchenko wrote:
quoted
On Thu, May 21, 2026 at 10:36:31AM +0200, Bartosz Golaszewski wrote:
quoted
Provide a platform-specific variant of device_set_of_node_from_dev(). In
addition to bumping the reference count of the OF node being assigned,
it also assigns the fwnode of the platform device.
Can we rather investigate the way how to make that of node reuse thingy
(which is used solely by pin control) differently and then drop this confusing
device_set_of_node_from_dev() call altogether?
No, that call is needed. See commit 4e75e1d7dac9 ("driver core: add
helper to reuse a device-tree node") for details.
Bart fixes the problem with the platform driver. At the result this will be
the only device_set_node() + 'reused = true'.  As for 'reused' flag, the need
is only for pinmux/pin control stuff.
And any other resource which may (eventually) be claimed by driver core
or bus code.
The question here is if there is a better
way to make that 'reused' be done automatically without need of setting some
flag explicitly.
That's not really relevant to the series at hand.

If this is something we want to merge then you need to continue setting
the flag in order not to cause regressions.

Johan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help