Re: [PATCH] soc: qcom: pmic_glink: Avoid losing early rpmsg probe
From: Dmitry Baryshkov
Date: Mon Jul 20 2026 - 11:08:34 EST
On Mon, Jul 20, 2026 at 04:39:02PM +0200, Konrad Dybcio wrote:
> From: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
>
> The PMIC GLINK rpmsg device can appear before the platform device has
> finished probing. In that case pmic_glink_rpmsg_probe() sees
> __pmic_glink as NULL and returns -ENODEV, which is treated as a fatal
> probe failure for the rpmsg endpoint.
>
> If this race is hit, pg->ept is never installed and PMIC GLINK clients
> never receive the service-up notification. This may leave the system
> with no Type-C functionality and without battery/power supply
> management.
>
> Return -EPROBE_DEFER when the rpmsg endpoint arrives before the platform
> device is ready.
>
> Fixes: 58ef4ece1e41 ("soc: qcom: pmic_glink: Introduce base PMIC GLINK driver")
> Assisted-by: Codex:GPT-5.5
> Signed-off-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
> ---
> drivers/soc/qcom/pmic_glink.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
--
With best wishes
Dmitry