Re: [PATCH v3 05/12] phy: qualcomm: qcom-uniphy-pcie-usb3-28lp: Use bulk reset_control API

From: Konrad Dybcio

Date: Tue Sep 01 2026 - 09:36:40 EST


On 8/25/26 2:37 PM, George Moussalem via B4 Relay wrote:
> From: George Moussalem <george.moussalem@xxxxxxxxxxx>
>
> Switch to using bulk reset_control functions to prepare the driver for
> managing multiple resets, acquiring reset controls by name, and
> uniformly storing resets in the private data structure to enable support
> for future combo PHY functionality requiring multiple resets.
>
> Signed-off-by: George Moussalem <george.moussalem@xxxxxxxxxxx>
> ---

[...]

> - phy->resets = devm_reset_control_array_get_exclusive(phy->dev);
> - if (IS_ERR(phy->resets))
> - return PTR_ERR(phy->resets);
> + count = of_count_phandle_with_args(dev->of_node, "resets", "#reset-cells");
> + if (count < 0)
> + return count;
> +
> + phy->resets = devm_kcalloc(dev, count, sizeof(*phy->resets), GFP_KERNEL);
> + if (!phy->resets)
> + return -ENOMEM;
> +
> + for (i = 0; i < count; i++) {
> + phy->resets[i].rstc = devm_reset_control_get_exclusive_by_index(dev, i);
> + if (IS_ERR(phy->resets[i].rstc))
> + return PTR_ERR(phy->resets[i].rstc);
> + }

reset_control_bulk_get_exclusive()

Konrad