[PATCH 1/3] hwspinlock: sun6i: Get the clock and the reset without names

Philipp Zabel p.zabel at pengutronix.de
Wed Nov 4 02:25:41 PST 2026


On So, 2026-09-27 at 09:56 +0700, Nguyen Minh Tien wrote:
> The driver looks up its clock and reset by the name "ahb", but the
> binding doesn't define clock-names or reset-names, so a node that
> follows the binding fails to probe:
> 
>   sun6i_hwspinlock 3005000.hwlock: unable to get AHB clock (-2)
> 
> There is only one of each, so get them without a name. That is what
> was asked for when the names were added to an A64 node, and nodes that
> do set "ahb" keep working. For the reset, call the explicit
> devm_reset_control_get_exclusive(), which devm_reset_control_get()
> only wraps.
> 
> Fixes: 3c881e05c814 ("hwspinlock: add sun6i hardware spinlock support")
> Link: https://lore.kernel.org/f720eaf9-01d0-0e57-f6bf-9aade00aafb8@linaro.org
> Signed-off-by: Nguyen Minh Tien <tien.nguyenminh at embeddedlinux.blog>
> ---
>  drivers/hwspinlock/sun6i_hwspinlock.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/hwspinlock/sun6i_hwspinlock.c b/drivers/hwspinlock/sun6i_hwspinlock.c
> index c2d3145880..e7cc121310 100644
> --- a/drivers/hwspinlock/sun6i_hwspinlock.c
> +++ b/drivers/hwspinlock/sun6i_hwspinlock.c
> @@ -104,14 +104,14 @@ static int sun6i_hwspinlock_probe(struct platform_device *pdev)
>  	if (!priv)
>  		return -ENOMEM;
>  
> -	priv->ahb_clk = devm_clk_get(&pdev->dev, "ahb");
> +	priv->ahb_clk = devm_clk_get(&pdev->dev, NULL);
>  	if (IS_ERR(priv->ahb_clk)) {
>  		err = PTR_ERR(priv->ahb_clk);
>  		dev_err(&pdev->dev, "unable to get AHB clock (%d)\n", err);
>  		return err;
>  	}
>  
> -	priv->reset = devm_reset_control_get(&pdev->dev, "ahb");
> +	priv->reset = devm_reset_control_get_exclusive(&pdev->dev, NULL);

Reviewed-by: Philipp Zabel <p.zabel at pengutronix.de>

regards
Philipp



More information about the linux-riscv mailing list