Re: [PATCH v3 net-next PATCH 1/1] net: phy: air_en8811h: Add clk provider for CKO pin

From: Russell King (Oracle)
Date: Sun Mar 16 2025 - 16:16:27 EST


On Sun, Mar 16, 2025 at 10:19:00PM +0800, Lucien.Jheng wrote:
> +#define to_en8811h_priv(_hw) \
> + container_of(_hw, struct en8811h_priv, hw)

Maybe better to call this "clk_hw_to_en8811h_priv()" ?

> +static int en8811h_clk_provider_setup(struct device *dev, struct clk_hw *hw)
> +{
> + struct clk_init_data init;
> + int ret;
> +
> + if (!IS_ENABLED(CONFIG_COMMON_CLK))
> + return 0;
> +
> + init.name = devm_kasprintf(dev, GFP_KERNEL, "%s-clk",
> + fwnode_get_name(dev_fwnode(dev)));

Given that this is the clk API, naming a clock with a "-clk" suffix
is redundant. Instead, consider something more descriptive. You say
this is the "CKO" output, so maybe "%s-cko" so that hardware reference
is included in the name.

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!