linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhang Rui <rui.zhang@intel.com>
To: rjw@sisk.pl
Cc: linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org,
	Zhang Rui <rui.zhang@intel.com>
Subject: [PATCH 0/6] ACPI bus conversion
Date: Wed, 25 Sep 2013 20:39:44 +0800	[thread overview]
Message-ID: <1380112790-2321-1-git-send-email-rui.zhang@intel.com> (raw)

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(-)


             reply	other threads:[~2013-09-25 12:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-25 12:39 Zhang Rui [this message]
2013-09-25 12:39 ` [PATCH 1/6] ACPI ac: convert ACPI ac driver to platform bus Zhang Rui
2013-09-25 12:39 ` [PATCH 2/6] ideapad_laptop: introduce #ifdef CONFIG_PM_SLEEP for PM specific code Zhang Rui
2013-09-25 12:39 ` [PATCH 3/6] ideapad_laptop: introduce struct acpi_device pointer to ideapad_private structure Zhang Rui
2013-09-25 12:39 ` [PATCH 4/6] ideapad_laptop: convert internal function calls to use ideapad_private as parameter Zhang Rui
2013-09-25 12:39 ` [PATCH 5/6] ideapad_laptop: remove ideapad_handle and ideapad_priv Zhang Rui
2013-09-25 12:39 ` [PATCH 6/6] ideapad_laptop: convert ideapad device/driver to platform bus Zhang Rui
2013-09-25 14:49 ` [PATCH 0/6] ACPI bus conversion Rafael J. Wysocki
2013-09-25 16:10   ` Matthew Garrett
2013-09-25 17:30     ` Rafael J. Wysocki
2013-09-25 22:47     ` Zhang, Rui
  -- strict thread matches above, loose matches on Subject: below --
2013-09-23  7:50 Zhang Rui
2013-09-23 23:24 ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1380112790-2321-1-git-send-email-rui.zhang@intel.com \
    --to=rui.zhang@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@sisk.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).