Re: [PATCH 18/28] dpll: zl3073x: Read optional pin properties from firmware
From: Krzysztof Kozlowski
Date: Mon Apr 07 2025 - 14:09:11 EST
On 07/04/2025 19:31, Ivan Vecera wrote:
> +
> + if (zl3073x_dpll_is_input_pin(pin))
> + node_name = "input-pins";
> + else
> + node_name = "output-pins";
> +
> + /* Get node containing input or output pins */
> + pins_node = device_get_named_child_node(zldpll->mfd->dev, node_name);
> + if (!pins_node) {
> + dev_dbg(zldpll->mfd->dev, "'%s' sub-node is missing\n",
> + node_name);
> + return NULL;
> + }
> +
> + /* Get pin HW index */
> + idx = zl3073x_dpll_pin_index_get(pin);
> +
> + /* Enumerate pin nodes and find the requested one */
> + fwnode_for_each_child_node(pins_node, pin_node) {
> + u32 reg;
> +
> + if (fwnode_property_read_u32(pin_node, "reg", ®))
> + continue;
> +
> + if (idx == reg)
> + break;
Where do you drop the reference to pin_node?
> + }
> +
> + /* Release pin parent node */
> + fwnode_handle_put(pins_node);
> +
Best regards,
Krzysztof