]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
driver core: platform: allow attaching software nodes when creating devices
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 14 Feb 2026 02:52:44 +0000 (18:52 -0800)
committerDanilo Krummrich <dakr@kernel.org>
Mon, 2 Mar 2026 11:13:43 +0000 (12:13 +0100)
commit0fc434bc2c45fceb9356f2138911db0f454b8ca6
treea901a96a37ba4ee855ab54027f4d305e31e2b308
parent94798081732abfb5748471d5c3cced6ff187fa36
driver core: platform: allow attaching software nodes when creating devices

Extend platform_device_info structure with an optional pointer to a
software node to be used as a secondary firmware node for the device
being created. If software node has not been registered yet it will be
automatically registered.

This reduces boilerplate needed when switching legacy board code to
static device properties/GPIO references.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260214025246.2095239-3-dmitry.torokhov@gmail.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
drivers/base/platform.c
include/linux/platform_device.h