Lines Matching +full:1 +full:- +full:cell
9 * SPDX-License-Identifier: Apache-2.0
20 * @defgroup devicetree-clocks Devicetree Clocks API
26 * @brief Test if a node has a clocks phandle-array property at a given index
28 * This expands to 1 if the given index is valid clocks property phandle-array index.
33 * n1: node-1 {
37 * n2: node-2 {
43 * DT_CLOCKS_HAS_IDX(DT_NODELABEL(n1), 0) // 1
44 * DT_CLOCKS_HAS_IDX(DT_NODELABEL(n1), 1) // 1
46 * DT_CLOCKS_HAS_IDX(DT_NODELABEL(n2), 1) // 0
49 * @param idx index of a clocks property phandle-array whose existence to check
50 * @return 1 if the index exists, 0 otherwise
56 * @brief Test if a node has a clock-names array property holds a given name
58 * This expands to 1 if the name is available as clocks-name array property cell.
63 * n1: node-1 {
65 * clock-names = "alpha", "beta";
68 * n2: node-2 {
70 * clock-names = "alpha";
75 * DT_CLOCKS_HAS_NAME(DT_NODELABEL(n1), alpha) // 1
76 * DT_CLOCKS_HAS_NAME(DT_NODELABEL(n1), beta) // 1
79 * @param node_id node identifier; may or may not have any clock-names property.
80 * @param name lowercase-and-underscores clock-names cell value name to check
81 * @return 1 if the clock name exists, 0 otherwise
91 * n1: node-1 {
95 * n2: node-2 {
102 * DT_NUM_CLOCKS(DT_NODELABEL(n2)) // 1
113 * "clocks" phandle-array property at an index
117 * clk1: clock-controller@... { ... };
119 * clk2: clock-controller@... { ... };
128 * DT_CLOCKS_CTLR_BY_IDX(DT_NODELABEL(n), 1)) // DT_NODELABEL(clk2)
150 * clocks phandle-array property by name
154 * clk1: clock-controller@... { ... };
156 * clk2: clock-controller@... { ... };
160 * clock-names = "alpha", "beta";
168 * @param name lowercase-and-underscores name of a clocks element
169 * as defined by the node's clock-names property
177 * @brief Get a clock specifier's cell value at an index
181 * clk1: clock-controller@... {
183 * #clock-cells = < 2 >;
192 * clock-cells:
193 * - bus
194 * - bits
199 * DT_CLOCKS_CELL_BY_IDX(DT_NODELABEL(n), 1, bits) // 40
203 * @param cell lowercase-and-underscores cell name
204 * @return the cell value at index "idx"
207 #define DT_CLOCKS_CELL_BY_IDX(node_id, idx, cell) \ argument
208 DT_PHA_BY_IDX(node_id, clocks, idx, cell)
211 * @brief Get a clock specifier's cell value by name
215 * clk1: clock-controller@... {
217 * #clock-cells = < 2 >;
222 * clock-names = "alpha", "beta";
227 * clock-cells:
228 * - bus
229 * - bits
237 * @param name lowercase-and-underscores name of a clocks element
238 * as defined by the node's clock-names property
239 * @param cell lowercase-and-underscores cell name
240 * @return the cell value in the specifier at the named element
243 #define DT_CLOCKS_CELL_BY_NAME(node_id, name, cell) \ argument
244 DT_PHA_BY_NAME(node_id, clocks, name, cell)
247 * @brief Equivalent to DT_CLOCKS_CELL_BY_IDX(node_id, 0, cell)
249 * @param cell lowercase-and-underscores cell name
250 * @return the cell value at index 0
253 #define DT_CLOCKS_CELL(node_id, cell) DT_CLOCKS_CELL_BY_IDX(node_id, 0, cell) argument
258 * @param idx index of a clocks property phandle-array whose existence to check
259 * @return 1 if the index exists, 0 otherwise
266 * @param inst DT_DRV_COMPAT instance number; may or may not have any clock-names property.
267 * @param name lowercase-and-underscores clock-names cell value name to check
268 * @return 1 if the clock name exists, 0 otherwise
283 * "clocks" phandle-array property at an index
305 * clocks phandle-array property by name
308 * @param name lowercase-and-underscores name of a clocks element
309 * as defined by the node's clock-names property
318 * @brief Get a DT_DRV_COMPAT instance's clock specifier's cell value
322 * @param cell lowercase-and-underscores cell name
323 * @return the cell value at index "idx"
326 #define DT_INST_CLOCKS_CELL_BY_IDX(inst, idx, cell) \ argument
327 DT_CLOCKS_CELL_BY_IDX(DT_DRV_INST(inst), idx, cell)
330 * @brief Get a DT_DRV_COMPAT instance's clock specifier's cell value by name
332 * @param name lowercase-and-underscores name of a clocks element
333 * as defined by the node's clock-names property
334 * @param cell lowercase-and-underscores cell name
335 * @return the cell value in the specifier at the named element
338 #define DT_INST_CLOCKS_CELL_BY_NAME(inst, name, cell) \ argument
339 DT_CLOCKS_CELL_BY_NAME(DT_DRV_INST(inst), name, cell)
342 * @brief Equivalent to DT_INST_CLOCKS_CELL_BY_IDX(inst, 0, cell)
344 * @param cell lowercase-and-underscores cell name
345 * @return the value of the cell inside the specifier at index 0
347 #define DT_INST_CLOCKS_CELL(inst, cell) \ argument
348 DT_INST_CLOCKS_CELL_BY_IDX(inst, 0, cell)