[PATCH v2 0/3] Allow attaching software node when registering platform devices
From: Dmitry Torokhov
Date: Fri Feb 13 2026 - 21:53:00 EST
When converting legacy board code to use static device properties,
especially when using static device properties for GPIO references,
it is often required to attach a secondary software node to platform
devices being created.
To reduce the amount of boilerplate needed add 'swnode' field to
platform_device_info structure and attach this software node (and
register it if it is not yet registered) as a secondary node to the
new platform device.
v2:
- add kerneldoc for platform_device_info
- split out formatting changes into a separate patch
Dmitry Torokhov (3):
driver core: platform: add kerneldoc to struct platform_device_info
driver core: platform: allow attaching software nodes when creating
devices
driver core: platform: fix various formatting issues
drivers/base/platform.c | 58 ++++++++++++++++-----------------
include/linux/platform_device.h | 58 ++++++++++++++++++++++++++-------
2 files changed, 76 insertions(+), 40 deletions(-)
Thanks.
--
Dmitry