Lines Matching +full:done +full:- +full:gpios

1 .. SPDX-License-Identifier: GPL-2.0
8 allows names to be given to GPIOs (and other things as well) returned
13 With _DSD we can now query GPIOs using a name instead of an integer
16 // Bluetooth device with reset and shutdown GPIOs
31 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
34 Package () { "reset-gpios", Package () { ^BTH, 1, 1, 0 } },
35 Package () { "shutdown-gpios", Package () { ^BTH, 0, 0, 0 } },
61 In our Bluetooth example the "reset-gpios" refers to the second GpioIo()
70 +-------------+-------------+-----------------------------------------------+
74 +-------------+-------------+-----------------------------------------------+
76 +-------------+-------------+-----------------------------------------------+
78 +-------------+-------------+-----------------------------------------------+
81 +-------------+-------------+-----------------------------------------------+
83 | +-------------+ as high, assuming non-active |
85 | +-------------+-----------------------------------------------+
87 +-------------+-------------+-----------------------------------------------+
89 | +-------------+ as low, assuming non-active |
91 | +-------------+-----------------------------------------------+
93 +-------------+-------------+-----------------------------------------------+
95 That said, for our above example the both GPIOs, since the bias setting
100 It is possible to leave holes in the array of GPIOs. This is useful in
102 implemented as GPIOs and some as native signals. For example a SPI host
103 controller can have chip selects 0 and 2 implemented as GPIOs and 1 as
107 "cs-gpios",
116 the SPISerialBus() resource defines it on the per-chip basis. In order
127 - gpio-hog
128 - output-high
129 - output-low
130 - input
131 - line-name
137 ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
139 Package () { "hog-gpio8", "G8PU" }
144 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
146 Package () { "gpio-hog", 1 },
147 Package () { "gpios", Package () { 8, 0 } },
148 Package () { "output-high", 1 },
149 Package () { "line-name", "gpio8-pullup" },
153 - gpio-line-names
155 The ``gpio-line-names`` declaration is a list of strings ("names"), which
158 table (typically inside the DSDT). The ``gpio-line-names`` list must respect the
161 - the first name in the list corresponds with the first line/pin of the GPIO
163 - the names inside the list must be consecutive (no "holes" are permitted)
164 - the list can be incomplete and can end before the last GPIO line: in
166 - empty names are allowed (two quotation marks ``""`` correspond to an empty
168 - names inside one GPIO controller/expander must be unique
174 "gpio-line-names",
189 gpiochip4 - 16 lines:
190 line 0: "pin_0" unused input active-high
191 line 1: "pin_1" unused input active-high
192 line 2: unnamed unused input active-high
193 line 3: unnamed unused input active-high
194 line 4: "pin_3" unused input active-high
195 line 5: "pin_4_push_button" unused input active-high
196 line 6: unnamed unused input active-high
197 line 7 unnamed unused input active-high
198 line 8: unnamed unused input active-high
199 line 9: unnamed unused input active-high
200 line 10: unnamed unused input active-high
201 line 11: unnamed unused input active-high
202 line 12: unnamed unused input active-high
203 line 13: unnamed unused input active-high
204 line 14: unnamed unused input active-high
205 line 15: unnamed unused input active-high
213 "gpio-line-names",
235 once it has identified the device. Having done that, it can simply assign names
239 To do that, the driver needs to define a mapping table as a NULL-terminated
245 line in that resource starting from zero, and the active-low flag for that line,
255 { "reset-gpios", &reset_gpio, 1 },
256 { "shutdown-gpios", &shutdown_gpio, 1 },
263 argument. That should be done in the driver's .probe() routine.
272 mapping, the Linux GPIO framework refuses to return any GPIOs. This is
295 the GpioIo() in _CRS desc will hold ERR_PTR(-ENOENT).
318 desc = gpiod_get(dev, "non-null-connection-id", flags);
319 desc = gpiod_get_index(dev, "non-null-connection-id", index, flags);