Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3043212img; Mon, 25 Mar 2019 02:32:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqyGJj5hadU69XcUznRyiMRrAoZ0MvlVk/6+i/eVH4RAUQHT8z4+F7nEntZohkJtgAiDEPjQ X-Received: by 2002:a17:902:7d81:: with SMTP id a1mr16136365plm.202.1553506363339; Mon, 25 Mar 2019 02:32:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553506363; cv=none; d=google.com; s=arc-20160816; b=Vr4+Pfeeo5IMZVp0ZG78TpYjVir4SIhS2bzd2hTuyXilE9VsWn3oypyDiMaW5CSBPz rEdCfM2zZbShyIFtxSdyx3ipcnbYLQwYytmz65abVXySIqf1AyDjXF8KiKzQle13Ofv0 wwBlQ8iVKgL6ZQ9/pE7GWdVnBqWmaFW2u2OSox7A6Mf1XsyuTCO5IIhaic4p92bHqnzo nagquQxASrFcjOat5509LG5LMzTP0fon6kD19cq4qm5KFFQSwZblyj/ltO4DPsEbrYGR 1H7m3oSDheAh2T4xaJ+Bcn6i0qpICrxI0K6tmd6q4EqdJ8pFehl++sJdGAr44MGyIPyI gCUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=EokbbCNypUQRj97LEIrYreQHlxeyCDH0r7kVx5EfcRI=; b=SFAs5ADUuNW625Qwuza8xAornPvnKXUpjZQmWg1mRFdeAdRCPrNKZFyATCo/Fjdyfw NNjWYB3KuLKyoGkh1BX8b5p3FSWymSNleHieFBtt+XXrfl5vozNMo1Pno7PPvDgGYNpu 0XC4XItpxaUcUATMo47/xL1NiB064jt5QSNmrREnDMOVKF+NUqDgErxXH5519sxRAHyt BgZOsyA/lz7DSSbUnCUi2PHdBxgc2kEBquhmCvmYj7A/FMnCFYmEA0qBYn+cJRlRkKQ3 qq0sukYsUs4ekz+bkHpGKI3s2aHJ63HFo6GA2gkIvk3Iq10pV90Dj8W76t8EzPlrkiY0 9X8w== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4si12953541pgs.333.2019.03.25.02.32.27; Mon, 25 Mar 2019 02:32:43 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730351AbfCYJbZ (ORCPT + 99 others); Mon, 25 Mar 2019 05:31:25 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:46065 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730147AbfCYJbZ (ORCPT ); Mon, 25 Mar 2019 05:31:25 -0400 Received: by mail-ot1-f65.google.com with SMTP id e5so7352854otk.12; Mon, 25 Mar 2019 02:31:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EokbbCNypUQRj97LEIrYreQHlxeyCDH0r7kVx5EfcRI=; b=Kh1B9f+botDvSwpE885yEtUb4tKL9/ItJXbwJaDtzangB43mlX5KQ41+y2r78q+uTM l9+ChcoG4dy3vx7ec3Gk2hORK64tQ0uNjqLQh4zuPS3wRJGcYbLIlS0v6XZxefVmv3fq 0oQ3+3fTthJFfUvoPbm6QoEcUnYyLY+v56C/o5J1l2keqHdMFnPqmfKPD5crWBdyTdje ZyNGGlYddyeJdyE+J1Nid14w/U+yEE2BbltpX3Y5q9eCYX+egbtAAsh4yTJZn83voynh aG9IloLtJwXZr5ZBd0NAXIP9Lx5U45euUVSly186iw3ClJnm4RHoGjiiOFVGilmvp7uN SVKg== X-Gm-Message-State: APjAAAXYZFulRJ7p/ij8D/sV5B3pRs1EyF90vBkXIcfGhFOdC9niQa6g 5Ad7HFJviiUhQGsdjO2LE3QvBcXu/AQC/JfkgqNNfg== X-Received: by 2002:a9d:738c:: with SMTP id j12mr16252144otk.119.1553506284446; Mon, 25 Mar 2019 02:31:24 -0700 (PDT) MIME-Version: 1.0 References: <20190322134705.27994-1-thomas.preston@codethink.co.uk> In-Reply-To: <20190322134705.27994-1-thomas.preston@codethink.co.uk> From: "Rafael J. Wysocki" Date: Mon, 25 Mar 2019 10:31:13 +0100 Message-ID: Subject: Re: [PATCH] Documentation: acpi: Add an example for PRP0001 To: Thomas Preston , Mika Westerberg , Andy Shevchenko Cc: "Rafael J. Wysocki" , Len Brown , ACPI Devel Maling List , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 22, 2019 at 2:47 PM Thomas Preston wrote: > > 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. Mika, Andy, can you have a look at this, please? > Signed-off-by: Thomas Preston > --- > Documentation/acpi/enumeration.txt | 27 +++++++++++++++++++++++++++ > 1 file changed, 27 insertions(+) > > diff --git a/Documentation/acpi/enumeration.txt b/Documentation/acpi/enumeration.txt > index 7bcf9c3d9fbe..391db643065a 100644 > --- a/Documentation/acpi/enumeration.txt > +++ b/Documentation/acpi/enumeration.txt > @@ -410,6 +410,33 @@ 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, "TITMP75") /* _HID will appear in sysfs */ > + 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 >