Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3332098img; Mon, 25 Mar 2019 08:13:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqyBBCpHBlB3e+MC5uukTCF2RQSYqmgvgNbGefym1w10PQJuFMPe00udwsfVB4D987C+I89f X-Received: by 2002:a65:63c1:: with SMTP id n1mr23579001pgv.339.1553526793443; Mon, 25 Mar 2019 08:13:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553526793; cv=none; d=google.com; s=arc-20160816; b=jPcJqZiE6TME/eM7PJHig+skMHpCv/aMv3niEzRYPoCZIFu88io6jQNplPFS7EXL6D xD18MVOnw56/kNtlejvCs3SLe5jZ+SQeb9dBMMa6l2j8ETicdtoUp/80MqA/ypcVQv1M xXlcxlMkdGf1o2Id2Cd7gdc+YtF37v7p3UZxSvJgYD+ILAkcyIA4umUACQ3dtUVqF6n/ ax6Rb+sy2Wy7+3JRtotLW4wC8KumsYHOziwWY6fuquDWutTGjTENuImbG3zZyZ+JJnAp Enji1FCxQZ79e2IV+NcRGpCpwIlAUTGD+gu1fj7vho4xZNjWSFxbsQm9VCERB/R64XNR Xh9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=T/8RUVPCTMN7z1Tk5DZo5c3/sGtBdoAKQoK7vhDpEfw=; b=R6BJAVW7STtQmwMBXttimBSQUgIwjc2ooDp5e7wcuJsIQZf3gl2omlq7+AWIrlbw6t 6ANGtIowIh5ZVWNSoddGK/9scvOOpMO6EU/Pj3NotWr4rKIty0Xg3Idve3vMbdT7JcuC na/+SsznSPx0cI5xLA0fKmoAdI7KRDdaJYqGIaoD70sCJEMqwFcjkMlx8tOYquV63VFy CZkISW1UI43+PcfwAqzBZVfU5VeeLrVeTzlN0bVDrKI1J0as13qCdz6epeLLpQwGnrsG MI5Qj+mgruvpLmzZmi00gob72uRLOXHuUYE5Owv8ayjbBWoF/J49qmoyALAmmRZcAfKe NOMQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h127si13420044pgc.407.2019.03.25.08.12.58; Mon, 25 Mar 2019 08:13:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729297AbfCYPMQ (ORCPT + 99 others); Mon, 25 Mar 2019 11:12:16 -0400 Received: from imap1.codethink.co.uk ([176.9.8.82]:34328 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726010AbfCYPMO (ORCPT ); Mon, 25 Mar 2019 11:12:14 -0400 Received: from [167.98.27.226] (helo=ct-lt-1124) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1h8RGl-0005oR-Ix; Mon, 25 Mar 2019 15:12:11 +0000 Received: from tpreston by ct-lt-1124 with local (Exim 4.89) (envelope-from ) id 1h8RGl-00063K-3d; Mon, 25 Mar 2019 15:12:11 +0000 From: Thomas Preston To: rjw@rjwysocki.net, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, andriy.shevchenko@linux.intel.com, mika.westerberg@linux.intel.com Cc: Thomas Preston Subject: [PATCH v2] Documentation: acpi: Add an example for PRP0001 Date: Mon, 25 Mar 2019 15:12:10 +0000 Message-Id: <20190325151210.23226-1-thomas.preston@codethink.co.uk> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add an example for the magic PRP0001 device ID which allows matching ACPI devices against drivers using OF Device Tree compatible property. It wasn't clear to me that PRP0001 could be used in _CID. Signed-off-by: Thomas Preston --- Documentation/acpi/enumeration.txt | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Documentation/acpi/enumeration.txt b/Documentation/acpi/enumeration.txt index 7bcf9c3d9fbe..8375fc506b47 100644 --- a/Documentation/acpi/enumeration.txt +++ b/Documentation/acpi/enumeration.txt @@ -410,6 +410,37 @@ Specifically, the device IDs returned by _HID and preceding PRP0001 in the _CID return package will be checked first. Also in that case the bus type the device will be enumerated to depends on the device ID returned by _HID. +For example, the following ACPI sample might be used to enumerate an lm75-type +I2C temperature sensor and match it to the driver using the Device Tree +namespace link: + + Device (TMP0) + { + /* _HID will appear in sysfs */ + Name (_HID, "PRP0001") + + /* _CID can also be used to search for "compatible" property */ + Name (_CID, "PRP0001") + + Name (_DSD, Package() { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package (2) { "compatible", "ti,tmp75" }, + } + }) + Method (_CRS, 0, Serialized) + { + Name (SBUF, ResourceTemplate () + { + I2cSerialBusV2 (0x48, ControllerInitiated, + 400000, AddressingMode7Bit, + "\\_SB.PCI0.I2C1", 0x00, + ResourceConsumer, , Exclusive,) + }) + Return (SBUF) + } + } + It is valid to define device objects with a _HID returning PRP0001 and without the "compatible" property in the _DSD or a _CID as long as one of their ancestors provides a _DSD with a valid "compatible" property. Such device -- 2.11.0