On Wed, Nov 4, 2026 at 10:12 PM Rafael J. Wysocki <[email protected]> wrote:
>
> Hi All,
>
> The ACPI "glue" code is responsible for binding Linux devices (like platform
> devices for one example) to their ACPI companions (represented by struct
> acpi_device objects).  This is done by acpi_device_notify() when the given
> device is registered.
>
> If the device's ACPI companion is set already at that point, the binding
> simply adds the device to the list of "physical nodes" associated with its
> ACPI companion.  That's the case for PCI devices and platform devices, for
> example.  However, there are cases in which the ACPI companion is not set
> upfront and it needs to be looked up via "lookup helpers" registered by
> the subsystems the devices in question belong to.  This series changes
> the "lookup helpers" representation and handling.
>
> Before the changes, the "lookup helpers" are represented by struct
> acpi_bus_type objects which is doubly confusing because they have nothing
> to do with bus types and because the "acpi_bus_type" name is also used
> elsewhere.  Patch [1/3] renames struct acpi_bus_type to struct acpi_dev_type
> because all of the existing "lookup helpers" operate on device types.
>
> Next, the registration and unregistration functions for "lookup helpers"
> are defined to return an int, but all of their existing users effectively
> discard their return values (they are discarded right away or passed up the
> call chain and then discarded).  Patch [2/3] changes the return type of
> those functions to void.
>
> Finally, since all of the existing "lookup helpers" match dev->type to
> a certain device type, they can be rearranged to point to the device
> types in question and provide a .find_companion() callback, and an
> additional .setup() callback in one case.  This is done by patch [3/3]
> and allows all of the affected code to be simplified quite a bit.

In the absence of any feedback I will assume no objections or concerns
and I'll queue up this lot for 7.5.

Thanks!

Reply via email to