Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3419336img; Mon, 25 Mar 2019 09:54:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxpV8VJHLkCg0XgKgpxmG0wWQ5J4ZVRNdieuyb+R3XwJqUeoCzBIflOXedNj/nCuXqxrL+U X-Received: by 2002:a17:902:3183:: with SMTP id x3mr26080215plb.170.1553532887451; Mon, 25 Mar 2019 09:54:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553532887; cv=none; d=google.com; s=arc-20160816; b=JPC1QvKic3JOhvmvmm1B7dIGzD20ZjmryYLcD4gVl/Cg9vnIDZ7/ORXUoMBaDNeOEN x+BjOig4yVSlqeJectRVX/3gbM8vM3dWHaVZLWqi3F7jNNcVoJcMQgEwluE1u0O2c06A vq8uhPPNJt1vR0WUSvcHTh0jYzsPo9dKLdqs21vVBd2uITApq0yRHkxEyQiVBczc5Lfh SMuTc/lCcmzYBrgC911CqPOo7p6vkyVoIkH44+HjEsOgG5q2rVmVT+2TVoYVVZ3lc2Ew oVWVfxhMo0wWglOTXJVUi3VJ4faN4By5BiqKYK+lpvuzUVINy2+evdHr6yBvdd6h13Gp uo6w== 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=vfw4cs2Af8RHIRbayKc7Z46dWSL0sX2tQKfqLrDTBYg=; b=EfP7Z30SI+RYbMfd/FlZaRCfsCopI/21knJRtDCIwt11S8HV7SIu/+b6z2ekaja8eW 2nEJL8yhR+pNS8Llxd+Um/qNjWBlRnhfD+pz1o9HXR+25LDGNYZm/Hr+V5Ypkyq7vDPh EqfAe0ig+3TQuBACUco7RAOUdOFsEbRXTt6pvCzQh5uXwFTYRb6yyZhRPpBnBjinF5il sewp9y6u44iQ/YB1ktyVtx/Dn/RyvvVycBcMLvgGIQlV74aYV0AtM8ZQ6+KjefqhJ/OO PBMEoW+W5Sg1dV6wLB36JJM2fgHVyUJGIzBMhRs7VPmJZxNbD4ESBkqYpdkieFYNkOfk 5pjA== 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 h22si13579962pgv.533.2019.03.25.09.54.31; Mon, 25 Mar 2019 09:54:47 -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 S1729493AbfCYQxm (ORCPT + 99 others); Mon, 25 Mar 2019 12:53:42 -0400 Received: from imap1.codethink.co.uk ([176.9.8.82]:38137 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725788AbfCYQxm (ORCPT ); Mon, 25 Mar 2019 12:53:42 -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 1h8Sqx-0000QV-TT; Mon, 25 Mar 2019 16:53:40 +0000 Received: from tpreston by ct-lt-1124 with local (Exim 4.89) (envelope-from ) id 1h8Sqx-0001Wg-H2; Mon, 25 Mar 2019 16:53:39 +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 v3] Documentation: acpi: Add an example for PRP0001 Date: Mon, 25 Mar 2019 16:53:38 +0000 Message-Id: <20190325165338.5826-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. Signed-off-by: Thomas Preston --- Documentation/acpi/enumeration.txt | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Documentation/acpi/enumeration.txt b/Documentation/acpi/enumeration.txt index 7bcf9c3d9fbe..1395b844649c 100644 --- a/Documentation/acpi/enumeration.txt +++ b/Documentation/acpi/enumeration.txt @@ -410,6 +410,32 @@ 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) + { + Name (_HID, "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