aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Preston <thomas.preston@codethink.co.uk>2019-03-25 12:53:38 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-03-28 05:30:00 -0400
commit4d720e2a8c5f5829ca6d79e02f653ca8b1470b8b (patch)
treec706150fdb027327aa5980e1cce1ece71941c581
parent8c2ffd9174779014c3fe1f96d9dc3641d9175f00 (diff)
Documentation: acpi: Add an example for PRP0001
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 <thomas.preston@codethink.co.uk> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--Documentation/acpi/enumeration.txt26
1 files changed, 26 insertions, 0 deletions
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
410return package will be checked first. Also in that case the bus type the device 410return package will be checked first. Also in that case the bus type the device
411will be enumerated to depends on the device ID returned by _HID. 411will be enumerated to depends on the device ID returned by _HID.
412 412
413For example, the following ACPI sample might be used to enumerate an lm75-type
414I2C temperature sensor and match it to the driver using the Device Tree
415namespace link:
416
417 Device (TMP0)
418 {
419 Name (_HID, "PRP0001")
420 Name (_DSD, Package() {
421 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
422 Package () {
423 Package (2) { "compatible", "ti,tmp75" },
424 }
425 })
426 Method (_CRS, 0, Serialized)
427 {
428 Name (SBUF, ResourceTemplate ()
429 {
430 I2cSerialBusV2 (0x48, ControllerInitiated,
431 400000, AddressingMode7Bit,
432 "\\_SB.PCI0.I2C1", 0x00,
433 ResourceConsumer, , Exclusive,)
434 })
435 Return (SBUF)
436 }
437 }
438
413It is valid to define device objects with a _HID returning PRP0001 and without 439It is valid to define device objects with a _HID returning PRP0001 and without
414the "compatible" property in the _DSD or a _CID as long as one of their 440the "compatible" property in the _DSD or a _CID as long as one of their
415ancestors provides a _DSD with a valid "compatible" property. Such device 441ancestors provides a _DSD with a valid "compatible" property. Such device