LKML Archive on
help / color / mirror / Atom feed
From: Daniel Drake <>
To: Yurii Pavlovskyi <>
Cc: Corentin Chary <>,
	Darren Hart <>,
	Andy Shevchenko <>,
	Chris Chiu <>,
	acpi4asus-user <>,
	Platform Driver <>,
	Linux Kernel <>,
	"Rafael J. Wysocki" <>,
	Len Brown <>,
	ACPI Devel Maling List <>
Subject: Re: [PATCH v4 04/13] platform/x86: wmi: Add function to get _UID of WMI device
Date: Fri, 24 May 2019 15:10:34 -0600	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Tue, May 14, 2019 at 12:59 PM Yurii Pavlovskyi
<> wrote:
> Add a new function to acpi.h / wmi.c that returns _UID of the ACPI WMI
> device. For example, it returns "ATK" for the following declaration in
> Device (ATKD)
> {
>     Name (_HID, "PNP0C14" /* Windows Management Instrumentation Device */)
>       // _HID: Hardware ID
>     Name (_UID, "ATK")  // _UID: Unique ID
>     ..
> Generally, it is possible that multiple PNP0C14 ACPI devices are present in
> the system as mentioned in the commit message of commit bff431e49ff5
> ("ACPI: WMI: Add ACPI-WMI mapping driver").
> Therefore the _UID is returned for a specific ACPI device that declares the
> given GUID, to which it is also mapped by other methods of wmi module.
> Signed-off-by: Yurii Pavlovskyi <>

Some extra background may be useful when reviewing this.

As researched in, we are
dealing with a tricky situation.

asus-wmi currently serves two different classes of device: eeepci-wmi
and asus-nb-wmi.

The eeepci devices have:
  _WDG : includes a METHOD block with GUID ASUS_WMI_MGMT_GUID, and an

The asus-nb-wmi devices have:
 _ WDG : includes a METHOD block with GUID ASUS_WMI_MGMT_GUID (same as
eeepc), and an EVENT block with GUID ASUS_NB_WMI_EVENT_GUID

To support new devices we now need to start concretely identifying
which of these we are working with. But complications include:
 - The main MGMT_GUID used for matching at the moment is shared over
both device types
 - Some Asus products have both of these (via two separate two
separate PNP0C14 WMI devices).

Currently eeepci-wmi and asus-nb-wmi register themselves with
asus-wmi, which registers a platform device for each one. The platform
dev probe then succeeds the platform device probe when it finds any
_WDG entry for the main MGMT_GUID and the _WDG entry for the
corresponding event GUID (not necessarily as part of the same
underlying ACPI Device). In the case of both devices being present
with duplicate MGMT, the first one that is parsed wins, and the other
is ignored (see guid_already_parsed()).

Sticking with the current approach, which is imperfect for devices
that have both devices, adding a method to detect the _UID seems
reasonable. Although actually I just realised you could probably also
detect the difference by using wmi_has_guid() on the EVENT UUID
without having to add a new function.

I'll keep thinking about how to improve the situation around two
devices present (but don't want to needlessly conflate this patch
series with that).


  reply	other threads:[~2019-05-24 21:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-14 18:47 [PATCH v4 00/13] Support of ASUS TUF Gaming series laptops Yurii Pavlovskyi
2019-05-14 18:50 ` [PATCH v4 01/13] platform/x86: asus-wmi: Fix hwmon device cleanup Yurii Pavlovskyi
2019-05-24 19:54   ` Daniel Drake
2019-05-14 18:51 ` [PATCH v4 02/13] platform/x86: asus-wmi: Fix preserving keyboard backlight intensity on load Yurii Pavlovskyi
2019-05-24 19:57   ` Daniel Drake
2019-05-14 18:54 ` [PATCH v4 03/13] platform/x86: asus-wmi: Increase input buffer size of WMI methods Yurii Pavlovskyi
2019-05-24 20:01   ` Daniel Drake
2019-05-14 18:59 ` [PATCH v4 04/13] platform/x86: wmi: Add function to get _UID of WMI device Yurii Pavlovskyi
2019-05-24 21:10   ` Daniel Drake [this message]
2019-05-14 19:00 ` [PATCH v4 05/13] platform/x86: asus-wmi: Improve DSTS WMI method ID detection Yurii Pavlovskyi
2019-05-14 19:01 ` [PATCH v4 06/13] platform/x86: asus-wmi: Refactor WMI event handling Yurii Pavlovskyi
2019-05-14 19:02 ` [PATCH v4 07/13] platform/x86: asus-wmi: Support WMI event queue Yurii Pavlovskyi
2019-05-14 19:02 ` [PATCH v4 08/13] platform/x86: asus-nb-wmi: Add microphone mute key code Yurii Pavlovskyi
2019-05-14 19:03 ` [PATCH v4 09/13] platform/x86: asus-wmi: Refactor error handling Yurii Pavlovskyi
2019-05-14 19:04 ` [PATCH v4 10/13] platform/x86: asus-wmi: Organize code into sections Yurii Pavlovskyi
2019-05-14 19:05 ` [PATCH v4 11/13] platform/x86: asus-wmi: Enhance detection of thermal data Yurii Pavlovskyi
2019-05-14 19:07 ` [PATCH v4 12/13] platform/x86: asus-wmi: Switch fan boost mode Yurii Pavlovskyi
2019-05-14 19:07 ` [PATCH v4 13/13] platform/x86: asus-wmi: Do not disable keyboard backlight on unloading Yurii Pavlovskyi
2019-06-29 13:13 ` [PATCH v4 00/13] Support of ASUS TUF Gaming series laptops Andy Shevchenko

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:

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

  git send-email \
    --in-reply-to='' \ \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH v4 04/13] platform/x86: wmi: Add function to get _UID of WMI device' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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