Skip to content

acpi: make ACPI use driver model

Zhang Rui linux-acpi 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 of 12 patches 16 repliesIn review

10 of 12 patches are in this archive. The cover letter announces 12.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12acpi: clean up scan.cdrivers/acpi/scan.c+401 -4140 replies
2/12acpi: rename some functionsdrivers/acpi/scan.c+7 -70 replies
3/12acpi: add device_driver and helper functionsdrivers/acpi/scan.c include/acpi/acpi_bus.h+3 -50 replies
6/12acpi: adjust init orderdrivers/acpi/Makefile+1 -10 replies
7/12acpi: sysfs convertdrivers/acpi/bus.c drivers/acpi/container.c drivers/acpi/processor_core.c +2 more+49 -1551 reply
8/12acpi: add acpi_bus_ops in acpi_devicedrivers/acpi/scan.c include/acpi/acpi_bus.h+29 -270 replies
9/12acpi: add acpi_bus_removal_type in acpi_devicedrivers/acpi/scan.c include/acpi/acpi_bus.h+5 -20 replies
10/12acpi: motherboard driverdrivers/acpi/motherboard.c+4 -150 replies
11/12acpi: acpi pci bridge driverdrivers/acpi/pci_bind.c drivers/acpi/pci_root.c drivers/acpi/scan.c+55 -232 replies
12/12acpi: set fake hiddrivers/acpi/pci_bind.c drivers/acpi/scan.c drivers/acpi/video.c +2 more+63 -614 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [0/12] acpi: make ACPI use driver model

Make ACPI use driver model.

Patrick has posted patches on rewriting ACPI driver model in November 2005. And recently Shaohua send me a prototype on making ACPI use driver model. This patch series bases on both Patrick and Shaohua's previous work.

Two features are gonna to be changed by applying this series of patches.
1. ACPI driver model.
ACPI driver are made to follow Linux driver model.
The mainly work is to convert the registeration interfaces, so that ACPI devices are registered with the global device tree. Note the new .uevent method mark ACPI drivers by PNPID instead of by name. Udev script needs to look for "HWID = " or "COMPTID = " to load the right ACPI driver.
2. ACPI sysfs interface.
As a result of using driver model, ACPI devices is added in the /sys/device tree. So after _EJ0 is added as a property of ACPI device in device tree, /sys/firm/acpi is deleted. Note that the corresponding userspace script needs to be changed for hot removal.

Note that this is only the first step of ACPI sysfs convert project. The next step is to duplicate /proc/acpi functions in /sys/device tree.