Lines Matching defs:node
162 static bool sunxi_pctrl_has_bias_prop(struct device_node *node)
164 return of_find_property(node, "bias-pull-up", NULL) ||
165 of_find_property(node, "bias-pull-down", NULL) ||
166 of_find_property(node, "bias-disable", NULL) ||
167 of_find_property(node, "allwinner,pull", NULL);
170 static bool sunxi_pctrl_has_drive_prop(struct device_node *node)
172 return of_find_property(node, "drive-strength", NULL) ||
173 of_find_property(node, "allwinner,drive", NULL);
176 static int sunxi_pctrl_parse_bias_prop(struct device_node *node)
181 if (of_find_property(node, "bias-pull-up", NULL))
184 if (of_find_property(node, "bias-pull-down", NULL))
187 if (of_find_property(node, "bias-disable", NULL))
191 if (of_property_read_u32(node, "allwinner,pull", &val))
206 static int sunxi_pctrl_parse_drive_prop(struct device_node *node)
211 if (!of_property_read_u32(node, "drive-strength", &val)) {
225 if (of_property_read_u32(node, "allwinner,drive", &val))
231 static const char *sunxi_pctrl_parse_function_prop(struct device_node *node)
237 ret = of_property_read_string(node, "function", &function);
242 ret = of_property_read_string(node, "allwinner,function", &function);
249 static const char *sunxi_pctrl_find_pins_prop(struct device_node *node,
255 count = of_property_count_strings(node, "pins");
262 count = of_property_count_strings(node, "allwinner,pins");
271 static unsigned long *sunxi_pctrl_build_pin_config(struct device_node *node,
278 if (sunxi_pctrl_has_drive_prop(node))
280 if (sunxi_pctrl_has_bias_prop(node))
293 if (sunxi_pctrl_has_drive_prop(node)) {
294 int drive = sunxi_pctrl_parse_drive_prop(node);
304 if (sunxi_pctrl_has_bias_prop(node)) {
305 int pull = sunxi_pctrl_parse_bias_prop(node);
328 struct device_node *node,
342 function = sunxi_pctrl_parse_function_prop(node);
344 dev_err(pctl->dev, "missing function property in node %pOFn\n",
345 node);
349 pin_prop = sunxi_pctrl_find_pins_prop(node, &npins);
351 dev_err(pctl->dev, "missing pins property in node %pOFn\n",
352 node);
368 pinconfig = sunxi_pctrl_build_pin_config(node, &configlen);
374 of_property_for_each_string(node, pin_prop, prop, group) {
1111 struct device_node *node,
1342 struct device_node *node)
1351 if (of_clk_get_parent_count(node) != 3)
1355 if (!of_find_property(node, "input-debounce", NULL))
1370 ret = of_property_read_u32_index(node, "input-debounce",
1407 struct device_node *node = pdev->dev.of_node;
1524 ret = of_clk_get_parent_count(node);
1552 pctl->domain = irq_domain_add_linear(node,
1585 sunxi_pinctrl_setup_debounce(pctl, node);