Thread (98 messages) 98 messages, 11 authors, 2021-02-07

Re: [PATCH v2 2/7] acpi: utils: Add function to fetch dependent acpi_devices

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2021-01-18 12:39:07
Also in: linux-acpi, linux-i2c, lkml, platform-driver-x86

On Mon, Jan 18, 2021 at 12:34:23AM +0000, Daniel Scally wrote:
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 function to parse all ACPI Devices and check if
the include the handle of the dependee device in their _DEP buffer.
Fix prefix to be "ACPI / utils: " and rebase on top of function name changes as
suggested by Laurent.

...
+/**
+ * acpi_dev_get_next_dep_dev - Return next ACPI device dependent on input dev
Are you expecting some kind of for_each_*() macro to be added and used?
Otherwise there is probably no need to have it "_next_" in the name as it will
be a bit confusing.
+ * @adev: Pointer to the dependee device
+ * @prev: Pointer to the previous dependent device (or NULL for first match)
+ *
+ * Return the next ACPI device which declares itself dependent on @adev in
+ * the _DEP buffer.
+ *
+ * The caller is responsible to call put_device() on the returned device.
+ */
-- 
With Best Regards,
Andy Shevchenko

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help