[PATCH] clk: clk-gpio: Use clk_register instead of bclk_register
Ahmad Fatoum
a.fatoum at pengutronix.de
Fri Jul 18 10:07:19 PDT 2025
On 18.07.25 15:37, Jonas Rebmann wrote:
> GPIO-gated clocks wrongfully used barebox clock interface which leads to
> bugs due to clk not being initialized from init->ops.
>
Fixes: b1fb0aac1ed5 ("gpio: clk-gpio: Updating the driver from the kernel repository")
> Signed-off-by: Jonas Rebmann <jre at pengutronix.de>
Reviewed-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
> ---
> drivers/clk/clk-gpio.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/clk/clk-gpio.c b/drivers/clk/clk-gpio.c
> index dc61c88b9f..3f9760c921 100644
> --- a/drivers/clk/clk-gpio.c
> +++ b/drivers/clk/clk-gpio.c
> @@ -96,7 +96,6 @@ static struct clk_hw *clk_register_gpio(struct device *dev, u8 num_parents,
> struct clk_hw *hw;
> struct clk_init_data init = {};
> const char *parent_names[2];
> - int err;
>
> clk_gpio = xzalloc(sizeof(*clk_gpio));
> if (!clk_gpio)
> @@ -116,11 +115,7 @@ static struct clk_hw *clk_register_gpio(struct device *dev, u8 num_parents,
> clk_gpio->hw.init = &init;
>
> hw = &clk_gpio->hw;
> - err = bclk_register(&clk_gpio->hw.clk);
> - if (err)
> - return ERR_PTR(err);
> -
> - return hw;
> + return clk_to_clk_hw(clk_register(dev, hw));
> }
>
> static struct clk_hw *clk_hw_register_gpio_gate(struct device *dev,
>
> ---
> base-commit: 89bf1fcc998fc5fea0ce613d9930dd9ee39c0fb2
> change-id: 20250717-clk_register-3ff98f73451e
>
> Best regards,
> --
> Jonas Rebmann <jre at pengutronix.de>
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list