Add acpi_dev_present
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 9 repliesIn review
- v15 patches 16 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | ACPI / scan: Fix acpi_bus_id_list bookkeepingdrivers/ | +14 | 6 replies | |
| 2/2 | ACPI / utils: Add acpi_dev_present()drivers/ drivers/ drivers/ +1 more | +42 | 3 replies |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Hanjun Guo |
|---|---|
| 1/2 | |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Devel] [PATCH v2 0/2] Add acpi_dev_present
Hi,
Quoted 6 lines · Hanjun Guo
I think those IDs already cached, in
acpi_init_device_object(),INIT_LIST_HEAD(&device->pnp.ids);
...acpi_set_pnp_ids(handle, &device->pnp, type);
please see APIacpi_device_hid(), so I think you can introduce a API withacpi_deviceand HID passed as arguments inscan.c
Thank you for your feedback, I've reworked the patch to iterate over acpi_bus_id_list instead of walking the namespace.
An alternative approach would have been to traverse the acpi_device tree but it would have been more code. If you would prefer that over the solution I've settled on please let me know. It would be useful for stuff like this to have a function that traverses the acpi_device tree and invokes a callback for each node, à la acpi_ns_walk_namespace(). Does such a thing exist already? If so I've missed it.
Quoted 1 line
Will those drivers be loaded before the acpi namespace is scanned?
I verified that all 7 existing users invoke the new API from initcall level "device". The bus is scanned in initcall level "subsystem", i.e. earlier. So we're on the safe side here. I added a note in the kernel-doc that the function may not be called from a subsys_initcall() or earlier, this will hopefully make it foolproof. (If you feel this is over the top then just leave it out if/when merging.)
Quoted 2 lines · Rafael J. Wysocki
I'd prefer that to go to
utils.cto be honest, even if the namespace needs to be walked.
Done. Since this is not part of ACPICA, would it be okay to merge via ASoC as requested by Mark Brown?
I've pushed the new version of the series to GitHub for more convenient reviewing. All driver patches except the one for Mark have acks now:
https://github.com/l1k/linux/commits/acpi_dev_present
Thanks,
Lukas
Lukas Wunner (2):
ACPI / scan: Fix acpi_bus_id_list bookkeeping
ACPI / utils: Add acpi_dev_present()
drivers/acpi/internal.h | 8 ++++++++ drivers/acpi/scan.c | 22 +++++++++++++++------- drivers/acpi/utils.c | 31 +++++++++++++++++++++++++++++++ include/acpi/acpi_bus.h | 2 ++ 4 files changed, 56 insertions(+), 7 deletions(-)
Signature · 1 line
1.8.5.2 (Apple Git-48)