linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: "Suthikulpanit, Suravee" <Suravee.Suthikulpanit@amd.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"lenb@kernel.org" <lenb@kernel.org>,
	"hdegoede@redhat.com" <hdegoede@redhat.com>,
	"tj@kernel.org" <tj@kernel.org>, "arnd@arndb.de" <arnd@arndb.de>,
	"mjg59@srcf.ucam.org" <mjg59@srcf.ucam.org>,
	"grant.likely@linaro.org" <grant.likely@linaro.org>,
	"hanjun.guo@linaro.org" <hanjun.guo@linaro.org>,
	"al.stone@linaro.org" <al.stone@linaro.org>,
	"graeme.gregory@linaro.org" <graeme.gregory@linaro.org>,
	"Duran, Leo" <leo.duran@amd.com>,
	"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linaro-acpi@lists.linaro.org" <linaro-acpi@lists.linaro.org>,
	Lv Zheng <lv.zheng@intel.com>
Subject: Re: [V3 PATCH 1/2] ACPI / scan: Add support for ACPI _CLS device matching
Date: Tue, 10 Feb 2015 11:59:32 +0200	[thread overview]
Message-ID: <20150210095932.GN1480@lahna.fi.intel.com> (raw)
In-Reply-To: <D0FF3AEC.1020B%suravee.suthikulpanit@amd.com>

On Mon, Feb 09, 2015 at 09:02:11PM +0000, Suthikulpanit, Suravee wrote:
> On 2/9/15, 19:15, "Mika Westerberg" <mika.westerberg@linux.intel.com>
> wrote:
> 
> >On Mon, Feb 09, 2015 at 12:02:43AM +0100, Rafael J. Wysocki wrote:
> >> On Monday, February 09, 2015 12:20:03 AM Suravee Suthikulpanit wrote:
> >> > Device drivers typically use ACPI _HIDs/_CIDs listed in struct
> >>device_driver
> >> > acpi_match_table to match devices. However, for generic drivers, we do
> >> > not want to list _HID for all supported devices, and some device
> >>classes
> >> > do not have _CID (e.g. SATA, USB). Instead, we can leverage ACPI _CLS,
> >> > which specifies PCI-defined class code (i.e. base-class, subclass and
> >> > programming interface).
> >> > 
> >> > This patch adds support for matching ACPI devices using the _CLS
> >>method.
> >> > 
> >> > Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
> >> 
> >> Greg, Mika, any problems with this?
> >
> >Is there some specific reason why this cannot be done in similar way
> >than PCI already does?
> >
> >In other words, stuff _CLS fields to struct acpi_device_id and make
> >match functions match against those if they are != 0.
> 
> That was my original thought. Then I realized that the acpi_device_id is
> used
> to create the device matching table, in which could contain several
> _HID/_CID.
> However, most of the added _CLS field would likely ended up being unused
> and
> taking up space.

Well, PCI is doing that already :)

> In contrast to _HID/_CID, a driver is likely to match just a single _CLS.
> So, I think it is cleaner to have just a dedicate struct acpi_device_cls,
> and 
> a matching function for it.

IMHO cleaner version is the one following PCI. Besides, how do you
support modules with this? Or did I miss something?

  reply	other threads:[~2015-02-10  9:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-08 16:20 [V3 PATCH 0/2] Introduce ACPI support for ahci_platform driver Suravee Suthikulpanit
2015-02-08 16:20 ` [V3 PATCH 1/2] ACPI / scan: Add support for ACPI _CLS device matching Suravee Suthikulpanit
2015-02-08 23:02   ` Rafael J. Wysocki
2015-02-08 23:36     ` Greg Kroah-Hartman
2015-02-09 11:15     ` Mika Westerberg
2015-02-09 21:02       ` Suthikulpanit, Suravee
2015-02-10  9:59         ` Mika Westerberg [this message]
2015-02-10 15:07           ` Rafael J. Wysocki
2015-02-11 22:35             ` Suthikulpanit, Suravee
2015-02-12 10:51               ` Mika Westerberg
2015-02-08 16:20 ` [V3 PATCH 2/2] ata: ahci_platform: Add ACPI _CLS matching Suravee Suthikulpanit

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=20150210095932.GN1480@lahna.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=Suravee.Suthikulpanit@amd.com \
    --cc=al.stone@linaro.org \
    --cc=arnd@arndb.de \
    --cc=graeme.gregory@linaro.org \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hanjun.guo@linaro.org \
    --cc=hdegoede@redhat.com \
    --cc=lenb@kernel.org \
    --cc=leo.duran@amd.com \
    --cc=linaro-acpi@lists.linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lv.zheng@intel.com \
    --cc=mjg59@srcf.ucam.org \
    --cc=rjw@rjwysocki.net \
    --cc=tj@kernel.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).