Lines Matching +full:gpio +full:- +full:n

3  * @brief GPIO Devicetree macro public API header file.
10 * SPDX-License-Identifier: Apache-2.0
21 * @defgroup devicetree-gpio Devicetree GPIO API
28 * gpio phandle-array property at an index
32 * gpio1: gpio@... { };
34 * gpio2: gpio@... { };
36 * n: node {
43 * DT_GPIO_CTLR_BY_IDX(DT_NODELABEL(n), gpios, 1) // DT_NODELABEL(gpio2)
46 * @param gpio_pha lowercase-and-underscores GPIO property with
47 * type "phandle-array"
49 * @return the node identifier for the gpio controller referenced at
59 * @param gpio_pha lowercase-and-underscores GPIO property with
60 * type "phandle-array"
61 * @return a node identifier for the gpio controller at index 0
69 * @brief Get a GPIO specifier's pin cell at an index
71 * This macro only works for GPIO specifiers with cells named "pin".
76 * gpio1: gpio@... {
77 * compatible = "vnd,gpio";
78 * #gpio-cells = <2>;
81 * gpio2: gpio@... {
82 * compatible = "vnd,gpio";
83 * #gpio-cells = <2>;
86 * n: node {
91 * Bindings fragment for the vnd,gpio compatible:
93 * gpio-cells:
94 * - pin
95 * - flags
99 * DT_GPIO_PIN_BY_IDX(DT_NODELABEL(n), gpios, 0) // 10
100 * DT_GPIO_PIN_BY_IDX(DT_NODELABEL(n), gpios, 1) // 30
103 * @param gpio_pha lowercase-and-underscores GPIO property with
104 * type "phandle-array"
115 * @param gpio_pha lowercase-and-underscores GPIO property with
116 * type "phandle-array"
124 * @brief Get a GPIO specifier's flags cell at an index
126 * This macro expects GPIO specifiers with cells named "flags".
127 * If there is no "flags" cell in the GPIO specifier, zero is returned.
132 * gpio1: gpio@... {
133 * compatible = "vnd,gpio";
134 * #gpio-cells = <2>;
137 * gpio2: gpio@... {
138 * compatible = "vnd,gpio";
139 * #gpio-cells = <2>;
142 * n: node {
147 * Bindings fragment for the vnd,gpio compatible:
149 * gpio-cells:
150 * - pin
151 * - flags
155 * DT_GPIO_FLAGS_BY_IDX(DT_NODELABEL(n), gpios, 0) // GPIO_ACTIVE_LOW
156 * DT_GPIO_FLAGS_BY_IDX(DT_NODELABEL(n), gpios, 1) // GPIO_ACTIVE_HIGH
159 * @param gpio_pha lowercase-and-underscores GPIO property with
160 * type "phandle-array"
171 * @param gpio_pha lowercase-and-underscores GPIO property with
172 * type "phandle-array"
180 * @brief Get the number of GPIO hogs in a node
186 * gpio1: gpio@... {
187 * compatible = "vnd,gpio";
188 * #gpio-cells = <2>;
190 * n1: node-1 {
191 * gpio-hog;
193 * output-high;
196 * n2: node-2 {
197 * gpio-hog;
199 * output-low;
203 * Bindings fragment for the vnd,gpio compatible:
205 * gpio-cells:
206 * - pin
207 * - flags
214 * @param node_id node identifier; may or may not be a GPIO hog node.
222 * @brief Get a GPIO hog specifier's pin cell at an index
224 * This macro only works for GPIO specifiers with cells named "pin".
229 * gpio1: gpio@... {
230 * compatible = "vnd,gpio";
231 * #gpio-cells = <2>;
233 * n1: node-1 {
234 * gpio-hog;
236 * output-high;
239 * n2: node-2 {
240 * gpio-hog;
242 * output-low;
246 * Bindings fragment for the vnd,gpio compatible:
248 * gpio-cells:
249 * - pin
250 * - flags
266 * @brief Get a GPIO hog specifier's flags cell at an index
268 * This macro expects GPIO specifiers with cells named "flags".
269 * If there is no "flags" cell in the GPIO specifier, zero is returned.
274 * gpio1: gpio@... {
275 * compatible = "vnd,gpio";
276 * #gpio-cells = <2>;
278 * n1: node-1 {
279 * gpio-hog;
281 * output-high;
284 * n2: node-2 {
285 * gpio-hog;
287 * output-low;
291 * Bindings fragment for the vnd,gpio compatible:
293 * gpio-cells:
294 * - pin
295 * - flags
312 * @brief Get a DT_DRV_COMPAT instance's GPIO specifier's pin cell value
315 * @param gpio_pha lowercase-and-underscores GPIO property with
316 * type "phandle-array"
327 * @param gpio_pha lowercase-and-underscores GPIO property with
328 * type "phandle-array"
336 * @brief Get a DT_DRV_COMPAT instance's GPIO specifier's flags cell
339 * @param gpio_pha lowercase-and-underscores GPIO property with
340 * type "phandle-array"
351 * @param gpio_pha lowercase-and-underscores GPIO property with
352 * type "phandle-array"