Skip to content

ACPI bus conversion

Zhang Rui linux-pm platform-driver-x86 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6ACPI ac: convert ACPI ac driver to platform busdrivers/acpi/ac.c drivers/acpi/acpi_platform.c+81 -830 replies
2/6ideapad_laptop: introduce #ifdef CONFIG_PM_SLEEP for PM specific codedrivers/platform/x86/ideapad-laptop.c+4 -00 replies
3/6ideapad_laptop: introduce struct acpi_device pointer to ideapad_private structuredrivers/platform/x86/ideapad-laptop.c+25 -230 replies
4/6ideapad_laptop: convert internal function calls to use ideapad_private as parameterdrivers/platform/x86/ideapad-laptop.c+21 -170 replies
5/6ideapad_laptop: remove ideapad_handle and ideapad_privdrivers/platform/x86/ideapad-laptop.c+69 -450 replies
6/6ideapad_laptop: convert ideapad device/driver to platform busdrivers/acpi/acpi_platform.c drivers/platform/x86/ideapad-laptop.c+93 -1030 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/6] ACPI bus conversion

Hi,

Currently, all the ACPI device objects are enumerated in ACPI bus. Some of them are used as real devices, while some of them are used as shadow devices.

This is misleading and confusing because we have several instances in Linux driver model for a single device.
So Rafael proposed to stop using ACPI as a shadow bus.
To do this, we need to:
1. for the devices that already have physical nodes, just leave them as they are today.
2. for the devices that are not associated with any physical nodes, make them platform bus devices.
3. create the sysfs subtree of ACPI objects under /sys/firmware/acpi/
4. remove ACPI bus from driver model.

This patch set, which converts two different kinds of ACPI devices/drivers to platform bus, is an experimentation of Step 2 above. And in general, so far so good. I do not see anything can really stuck us so far, although I do get a couple of problems when converting the ideapad_laptop driver and rewrite the patches for a few times.

I've tested the patches on an Lenovo U300s, which has a VPC2004 device. Both the AC adapter and the ideapad_laptop drivers work well. They are shown in platform bus, and their sysfs/debugfs work well.

thanks,
rui

-----------------------------------------------------------------------

 drivers/acpi/ac.c                     |  163 ++++++++--------
 drivers/acpi/acpi_platform.c          |    3 +-
 drivers/platform/x86/ideapad-laptop.c |  344 ++++++++++++++++++---------------
 3 files changed, 266 insertions(+), 244 deletions(-)