linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Mark Brown <broonie@kernel.org>
Cc: Darren Hart <dvhart@linux.intel.com>,
	Grant Likely <grant.likely@secretlab.ca>,
	Ben Zhang <benzh@chromium.org>,
	alsa-devel <alsa-devel@alsa-project.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Bard Liao <bardliao@realtek.com>,
	Oder Chiou <oder_chiou@realtek.com>,
	Anatol Pomozov <anatol@google.com>,
	Dylan Reid <dgreid@chromium.org>,
	flove@realtek.com,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] ASoC: rt5677: Add ACPI device probing
Date: Sat, 29 Nov 2014 00:51:59 +0100	[thread overview]
Message-ID: <2127240.rWRTDu6LHQ@vostro.rjw.lan> (raw)
In-Reply-To: <20141128160036.GW7712@sirena.org.uk>

On Friday, November 28, 2014 04:00:36 PM Mark Brown wrote:
> 
> --k9ssVBY1NpawPNl1
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> 
> On Thu, Nov 27, 2014 at 12:09:55AM +0100, Rafael J. Wysocki wrote:
> > On Wednesday, November 26, 2014 11:17:16 AM Mark Brown wrote:
> 
> > > > As to registering ACPI IDs, I believe this is the right link:
> > > > http://www.uefi.org/PNP_ACPI_Registry
> 
> > > No, those are vendors as far as I can tell.  I mean identifiers for
> > > specific devices - it appears to be common for for example Intel to
> > > allocate identifiers for devices they don't produce, I'd expect there to
> > > be some effort to keep track of that especially given that _DSD
> > > properties may well end up being specific to the identifier used to
> > > register in cases of parallel evolution.
> 
> > The vendor (or more precisely the owner of the initial 3 or 4 letter code)
> > is supposed to do that.  I'm not aware of any common registry of those IDs
> > for all vendors.
> 
> OK, we probably should have one to aid discoverability since as far as I
> can tell what's happening is that people (hi Intel!) are allocating
> their own identifiers for devices produced by other vendors that turn up
> on their boards.  If people can find the set of IDs in use there's more
> chance they'll use the same ones as other people.

There's the PRP0001 ID that can be use to in combination with the
"compatible" property which then works the same way as for DT.

That should be sufficient if the properties are going to be the
same for ACPI (_DSD) and DT.

> > > > Or did you mean a HID/CID<->DSD mapping?
> 
> > > I don't really know what that is, sorry.
> 
> > The device ID is supposed to determine the way all of the ACPI objects for that
> > device will work, including what is returned by _DSD.  Pretty much in analogy
> > with PCI device IDs.
> 
> So the HID and CID are device IDs then?  Please bear in mind that we're
> not all familiar with the acronym soup that tends to go along with ACPI!

Yes, they are supposed to be treated this way.

> If those are device IDs then what you're saying is what I'd expect to
> happen and it's part of the reason I'd expect us to be registering IDs
> along with registering properties - if people are defining device
> specific properties they really ought to be tied to the IDs that are in
> use especially if (as seems likely to be the case with the current state
> of the world) people are doing things without attempting to coordinate
> and we're ending up trying to document the deployed reality.

The rule of thumb (in my view) should be that if the device object's _DSD is
going to return the same set of properties as for DT and no other special
handling determined by the ID is required (ie. nothing along the lines of
"if the device ID is X, the _ABC method works like that" which has to be known
by the driver), "PRP0001" should be returned by _HID and then the value of the
"compatible" property should be the same as for DT.

In other words, "PRP0001" means "a generic device with properties as returned
by _DSD".

Otherwise, a new device ID needs to be allocated for the device and _HID
should return that ID.  Also, if the device is compatible with another
device with an already allocated ID (for _HID), _CID may return the device ID
of the compatible device.  [Of course, it's better if _HID is the same for
identical devices.]


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

  reply	other threads:[~2014-11-28 23:30 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-15  6:56 [PATCH 1/2] ASoC: rt5677: Add ACPI device probing Ben Zhang
2014-11-15  6:56 ` [PATCH 2/2] ASoC: rt5677: add a platform config option for PDM clock divider Ben Zhang
2014-11-25 12:07 ` [PATCH 1/2] ASoC: rt5677: Add ACPI device probing Mark Brown
2014-11-25 12:11 ` Grant Likely
2014-11-25 14:28   ` [alsa-devel] " Liam Girdwood
2014-11-25 16:01     ` Darren Hart
2014-11-25 18:37       ` Liam Girdwood
2014-11-25 16:00   ` Darren Hart
2014-11-25 17:21     ` Mark Brown
2014-11-25 18:33       ` Darren Hart
2014-11-25 18:43         ` Mark Brown
2014-11-25 19:07           ` Darren Hart
2014-11-25 19:36             ` Mark Brown
2014-11-25 20:32               ` Rafael J. Wysocki
2014-11-25 20:31             ` Rafael J. Wysocki
2014-11-25 20:27               ` Mark Brown
2014-11-25 21:40                 ` Rafael J. Wysocki
2014-11-25 22:15                   ` Mark Brown
2014-11-25 22:41                   ` Ben Zhang
2014-11-25 22:45                     ` Mark Brown
2014-12-04 10:48                   ` Grant Likely
2014-12-04 16:46                     ` Mark Brown
2014-12-04 21:53                     ` Rafael J. Wysocki
2014-11-26  1:48           ` Darren Hart
2014-11-26 11:17             ` Mark Brown
2014-11-26 23:09               ` Rafael J. Wysocki
2014-11-28 16:00                 ` Mark Brown
2014-11-28 23:51                   ` Rafael J. Wysocki [this message]
2014-11-29 11:52                     ` Mark Brown
2014-11-29 22:27                       ` Rafael J. Wysocki
2014-12-01 17:51                         ` Mark Brown
2014-12-01 22:16                           ` Rafael J. Wysocki
2014-12-01 22:19                             ` Mark Brown
2014-12-01 22:55                               ` Rafael J. Wysocki
2014-12-04 11:12                         ` Grant Likely
2014-12-04 11:51                           ` Mark Brown

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=2127240.rWRTDu6LHQ@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=alsa-devel@alsa-project.org \
    --cc=anatol@google.com \
    --cc=bardliao@realtek.com \
    --cc=benzh@chromium.org \
    --cc=broonie@kernel.org \
    --cc=dgreid@chromium.org \
    --cc=dvhart@linux.intel.com \
    --cc=flove@realtek.com \
    --cc=grant.likely@secretlab.ca \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oder_chiou@realtek.com \
    /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).