aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2015-04-01 04:13:16 -0400
committerJonathan Corbet <corbet@lwn.net>2015-04-04 09:20:27 -0400
commitcfc507648c2c9060aeba0d1a41bb5e5985f16636 (patch)
treef09c07f83670cc7e9604a7c2a9baf8913f34faaa
parent7085f6c354e1d0b1cc6efafc1389dc63f8b0699a (diff)
Documentation: gpio: Update ACPI part of the document to mention _DSD
With ACPI 5.1 _DSD (Device Specific Data) it is now possible to name functions just like Device Tree is doing. Make sure that the documentation mentions _DSD as the recommended way to describe GPIOs in ACPI systems. Reported-by: Darren Hart <dvhart@linux.intel.com> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
-rw-r--r--Documentation/gpio/board.txt41
1 files changed, 37 insertions, 4 deletions
diff --git a/Documentation/gpio/board.txt b/Documentation/gpio/board.txt
index 8b35f51fe7b6..b80606de545a 100644
--- a/Documentation/gpio/board.txt
+++ b/Documentation/gpio/board.txt
@@ -50,10 +50,43 @@ gpiod_is_active_low(power) will be true).
50 50
51ACPI 51ACPI
52---- 52----
53ACPI does not support function names for GPIOs. Therefore, only the "idx" 53ACPI also supports function names for GPIOs in a similar fashion to DT.
54argument of gpiod_get_index() is useful to discriminate between GPIOs assigned 54The above DT example can be converted to an equivalent ACPI description
55to a device. The "con_id" argument can still be set for debugging purposes (it 55with the help of _DSD (Device Specific Data), introduced in ACPI 5.1:
56will appear under error messages as well as debug and sysfs nodes). 56
57 Device (FOO) {
58 Name (_CRS, ResourceTemplate () {
59 GpioIo (Exclusive, ..., IoRestrictionOutputOnly,
60 "\\_SB.GPI0") {15} // red
61 GpioIo (Exclusive, ..., IoRestrictionOutputOnly,
62 "\\_SB.GPI0") {16} // green
63 GpioIo (Exclusive, ..., IoRestrictionOutputOnly,
64 "\\_SB.GPI0") {17} // blue
65 GpioIo (Exclusive, ..., IoRestrictionOutputOnly,
66 "\\_SB.GPI0") {1} // power
67 })
68
69 Name (_DSD, Package () {
70 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
71 Package () {
72 Package () {
73 "led-gpios",
74 Package () {
75 ^FOO, 0, 0, 1,
76 ^FOO, 1, 0, 1,
77 ^FOO, 2, 0, 1,
78 }
79 },
80 Package () {
81 "power-gpios",
82 Package () {^FOO, 3, 0, 0},
83 },
84 }
85 })
86 }
87
88For more information about the ACPI GPIO bindings see
89Documentation/acpi/gpio-properties.txt.
57 90
58Platform Data 91Platform Data
59------------- 92-------------