[PATCH v7 3/6] dt-bindings: phy: realtek,usb2phy.yaml: extend for resets and RTL9607C support

sashiko-bot at kernel.org sashiko-bot at kernel.org
Sat Aug 15 02:25:15 PDT 2026


Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Unused `read` function pointer in `struct phy_reg_desc`.
--

--- Patch [3]: [PATCH v7 3/6] dt-bindings: phy: realtek,usb2phy.yaml: extend for resets and RTL9607C support ---
commit 16f65d15255be7042c02dfe746526c8bd6b0efc9
Author: Rustam Adilov <adilov at disroot.org>

dt-bindings: phy: realtek,usb2phy.yaml: extend for resets and RTL9607C support

This commit adds the realtek,rtl9607-usb2phy compatible for the USB2 PHY
on the RTL9607C SoC series. It also introduces a resets property to
describe the multipurpose USB2 PHY reset line, making it required for
the RTL9607C SoC while explicitly disabling it for other RTD devices.

> diff --git a/drivers/phy/realtek/phy-rtk-usb2.c b/drivers/phy/realtek/phy-rtk-usb2.c
> index e8d0f0119ec0a..5e483c853f02f 100644
> --- a/drivers/phy/realtek/phy-rtk-usb2.c
> +++ b/drivers/phy/realtek/phy-rtk-usb2.c
> @@ -64,6 +64,8 @@ struct phy_reg_desc {
>  	int vstatus_offset;
>  	u32 vstatus_busy;
>  	u32 new_reg_req;
> +	u32 (*read)(void __iomem *reg);

[Severity: Low]
Is this read function pointer ever consumed?

It appears to be added to the descriptor struct but is never called
anywhere in the driver.

> +	void (*write)(u32 val, void __iomem *reg);
>  };

[ ... ]

> @@ -130,6 +132,16 @@ struct rtk_phy {
>  	struct dentry *debug_dir;
>  };
>  
> +static u32 rtk_usb2phy_read(void __iomem *reg)
> +{
> +	return readl(reg);
> +}

[Severity: Low]
Is it necessary to implement this default read function?

Since the read function pointer in struct phy_reg_desc is unused, this
implementation might be dead code.

> +
> +static void rtk_usb2phy_write(u32 val, void __iomem *reg)
> +{
> +	writel(val, reg);
> +}

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260815091340.26910-1-adilov@disroot.org?part=3



More information about the linux-phy mailing list