[PATCH v2 3/4] phy: core: Add phy bulk data helper functions

Vladimir Oltean olteanv at gmail.com
Mon Sep 7 03:56:11 PDT 2026


On Fri, Sep 04, 2026 at 04:37:07PM +0800, Inochi Amaoto wrote:
> diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
> index ea47975e288a..13f9f030122f 100644
> --- a/include/linux/phy/phy.h
> +++ b/include/linux/phy/phy.h
> @@ -81,6 +81,17 @@ union phy_configure_opts {
>  	struct phy_configure_opts_hdmi		hdmi;
>  };
>  
> +/**
> + * struct phy_bulk_data - Data used for bulk phy operations.
> + *
> + * @id: phy consumer ID
> + * @phy: struct phy * to store the associated phy
> + */
> +struct phy_bulk_data {
> +	const char	*id;
> +	struct phy	*phy;

It's not clear from your design intention if struct phy_bulk_data :: phy
is permitted to be accessed individually by consumers. Personally I see
no reason to. In that case, can you explicitly mark "struct phy *phy" as
"/* private: Internal use */" (like struct regulator_bulk_data does,
albeit for "ret"), or simply say in the kernel-doc description that it
is managed internally by the PHY framework (as is done for both struct
regulator_bulk_data and for struct icc_bulk_data :: path)?

This should help at least LLM review flag abusive users.

> +};



More information about the linux-phy mailing list