Thread (27 messages) 27 messages, 5 authors, 2021-05-26

Re: [PATCH v4 2/8] ACPI: scan: Add function to fetch dependent of acpi device

From: Daniel Scally <djrscally@gmail.com>
Date: 2021-05-21 19:25:40
Also in: linux-acpi, linux-gpio, linux-i2c, lkml, platform-driver-x86

Hi Rafael

On 20/05/2021 19:55, Rafael J. Wysocki wrote:
On Thu, May 20, 2021 at 8:33 PM Rafael J. Wysocki [off-list ref] wrote:
quoted
On Thu, May 20, 2021 at 4:11 PM Daniel Scally [off-list ref] wrote:
quoted
In some ACPI tables we encounter, devices use the _DEP method to assert
a dependence on other ACPI devices as opposed to the OpRegions that the
specification intends. We need to be able to find those devices "from"
the dependee, so add a callback and a wrapper to walk over the
acpi_dep_list and return the dependent ACPI device.

Reviewed-by: Andy Shevchenko <redacted>
Signed-off-by: Daniel Scally <djrscally@gmail.com>
---
Changes since v3:

        Both new functions were renamed.

 drivers/acpi/scan.c     | 38 ++++++++++++++++++++++++++++++++++++++
 include/acpi/acpi_bus.h |  1 +
 2 files changed, 39 insertions(+)
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 195635c3462b..1a76fbdfa669 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -2105,6 +2105,21 @@ static void acpi_bus_attach(struct acpi_device *device, bool first_pass)
                device->handler->hotplug.notify_online(device);
 }

+static int acpi_return_dep_dev(struct acpi_dep_data *dep, void *data)
What about calling this acpi_get_first_consumer_cb()?
Or acpi_dev_get_first_consumer_dev_cb() if you want to be super-precise?

Sure; fine by me, and same for the other function


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help