]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ACPI: scan: Register platform devices for backlight device objects
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 2 Jan 2026 11:50:57 +0000 (12:50 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 15 Jan 2026 13:26:34 +0000 (14:26 +0100)
commit336aae5c4e1a473018136524b18a74877310c0a3
treed958659e4c7470011253a5a3d5fc6be2244b5c7a
parent9460eaae2ee42e7f2267ea12b26aa59c391996a7
ACPI: scan: Register platform devices for backlight device objects

ACPI device objects associated with backlight interfaces are special
because they are ACPI companions of PCI devices (GPUs), but the
interfaces exposed by them resemble platform device one.

Currently, the ACPI video driver binds to them with the help of a
special "synthetic" device ID regardless of the pairing with the PCI
devices, but since it is generally better to use platform drivers for
handling such interfaces, the plan is to convert that drviver into a
platform one.

However, for this purpose, platform devices corresponding to the
ACPI backlight device objects need to be registered, so update
acpi_bus_attach() to apply the default ACPI enumeration to them
and modify acpi_create_platform_device() to avoid bailing out early
if a "physical" device is already attached to a backlight ACPI device
object.

In addition, update acpi_companion_match() to return a valid struct
acpi_device pointer if the ACPI companion of the given device is a
backlight ACPI device object, which will facilitate driver matching
for platform devices corresponding to those objects.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Link: https://patch.msgid.link/5081593.31r3eYUQgx@rafael.j.wysocki
drivers/acpi/acpi_platform.c
drivers/acpi/bus.c
drivers/acpi/scan.c