linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhang Rui <rui.zhang@intel.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Grant Likely <grant.likely@secretlab.ca>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	linux-i2c <linux-i2c@vger.kernel.org>,
	Dirk Brandewie <dirk.brandewie@gmail.com>,
	linux-pm <linux-pm@lists.linux-foundation.org>
Subject: [RFC PATCH 0/6] ACPI: ACPI 5.0 device enumeration proposal
Date: Fri, 28 Sep 2012 15:37:43 +0800	[thread overview]
Message-ID: <1348817863.10877.320.camel@rui.sh.intel.com> (raw)

Hi, all,

I'm working on ACPI device enumeration support recently, and here is the
proposal I made to enumerate devices via ACPI namespace.

the main idea is that, for Serial Buses like I2C and SPI, we enumerate
the controller as a platform device, and then enumerate the slaves via
i2c/spi_register_board_info. And then, when the controller is really
probed and enabled in the platform driver, the SPI/I2C bus code will
enumerate I2C/SPI slaves automatically.
And for the other devices, we will enumerate all of them as platform
devices, which is not covered in this patch set yet.

Patch 1 & 2 Introduce ACPI style device match method in platform_match.
this is because an ACPI device may have multiple hardware ID (_HID) and
Compatible IDs, aka, _CID, but in platform device code, only pdev->name
is used to match the driver id_table currently.
Patch 3 introduces a new API acpi_get_generic_resources().
this API is used to convert ACPI style resources to the generic struct
resource.
Patch 4 changes i2c_register_board_info from __init to __devinit.
This is needed because I want to enumerate the slave devices in ACPI I2C
control Driver, which supports hotplug in theory.
Patch 5 introduces the ACPI I2C controller enumeration drive.
it enumerate the ACPI I2C controller to a platform device and then
enumerate the I2C slaves as I2C_board_info.
Patch 6 is an example driver for an ACPI enuemrated I2C controller.

Note that this is just prototype patch set, which just passes build
test. Because I'd like to get your ideas about this before going on.
any comments are welcome.

thanks,
rui

             reply	other threads:[~2012-09-28  7:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-28  7:37 Zhang Rui [this message]
     [not found] ` <1348817863.10877.320.camel-fuY85erJQUO75v1z/vFq2g@public.gmane.org>
2012-10-01  6:44   ` [RFC PATCH 0/6] ACPI: ACPI 5.0 device enumeration proposal Mika Westerberg
2012-10-01 14:30     ` Zhang, Rui
     [not found]       ` <744357E9AAD1214791ACBA4B0B90926322D989-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2012-10-02  6:19         ` Mika Westerberg

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=1348817863.10877.320.camel@rui.sh.intel.com \
    --to=rui.zhang@intel.com \
    --cc=dirk.brandewie@gmail.com \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    /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).