On 2/16/2024 7:57 AM, Andrew Lunn wrote:
+ for (i = 0; i < CLK_NUM; i++) {
+ priv->clks[i] = devm_clk_get_enabled(&pdev->dev, clk_strs[i]);
+ if (IS_ERR(priv->clks[i])) {
+ dev_err(dev, "failed to get enabled clk %s: %ld\n", clk_strs[i],
+ PTR_ERR(priv->clks[i]));
+ ret = -ENODEV;
+ goto out_free_netdev;
+ }
The clk API has devm_clk_bulk_ versions. Please take a look at them, and see
if it will simplify the code.
I know this API, but it can't be used. We need to control clocks
individually in reset procedure.
Andrew
--
Regards,
Yang Xiwen