Re: [PATCH 1/2] phy: qualcomm: eusb2-repeater: Fix the regfields for multiple instances

From: Konrad Dybcio
Date: Thu Jan 04 2024 - 17:46:18 EST


On 4.01.2024 15:52, Abel Vesa wrote:
> The global regmap fields offsets currently get incremented with the base
> address of the repeater. This issue doesn't get noticed unless the probe
> defers or there are multiple repeaters on that platform. So instead of
> incrementing the global ones, copy them for each instance of the
> repeater.
>
> Fixes: 4ba2e52718c0 ("phy: qualcomm: phy-qcom-eusb2-repeater: Use regmap_fields")
> Signed-off-by: Abel Vesa <abel.vesa@xxxxxxxxxx>
> ---
Ohh I wouldn't have thought about this.. Nice spot!

[...]

> - struct reg_field *regfields = eusb2_repeater_tune_reg_fields;
> struct eusb2_repeater *rptr = phy_get_drvdata(phy);
> + struct reg_field *regfields = rptr->regfields;
Without this:

Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxx>

Konrad