Re: [PATCH] phy: renesas: rcar-gen3-usb2: Simplify ID/VBUS detection logic

From: Lad, Prabhakar

Date: Tue Mar 24 2026 - 08:23:26 EST


Hi All,

On Tue, Mar 24, 2026 at 12:16 PM Prabhakar <prabhakar.csengg@xxxxxxxxx> wrote:
>
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
>
> Read the USB2_ADPCTRL register once in rcar_gen3_check_id() and reuse
> the value instead of performing multiple MMIO reads.
>
> Simplify the return logic by comparing the IDDIG and VBUSVALID bits
> directly. This preserves the existing behaviour while improving code
> clarity and avoiding redundant register accesses.
>
> Reported-by: Pavel Machek <pavel@xxxxxxxxxxxx>
> Closes: https://lore.kernel.org/all/acJV-Xq-2uq_JFMn@xxxxxxxxxx/
My bad, wrong link, https://lore.kernel.org/all/acJVCOdlchLiSe5n@xxxxxxxxxx/


Cheers,
Prabhakar