From: Jonas Rebmann <jre@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>,
BAREBOX <barebox@lists.infradead.org>
Cc: Alexander Shiyan <eagle.alexander923@gmail.com>,
Jonas Rebmann <jre@pengutronix.de>
Subject: [PATCH] clk: clk-gpio: Use clk_register instead of bclk_register
Date: Fri, 18 Jul 2025 15:37:18 +0200 [thread overview]
Message-ID: <20250718-clk_register-v1-1-009e23a7da84@pengutronix.de> (raw)
GPIO-gated clocks wrongfully used barebox clock interface which leads to
bugs due to clk not being initialized from init->ops.
Signed-off-by: Jonas Rebmann <jre@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@pengutronix.de>
next reply other threads:[~2025-07-18 13:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-18 13:37 Jonas Rebmann [this message]
2025-07-18 17:07 ` Ahmad Fatoum
2025-08-05 8:33 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250718-clk_register-v1-1-009e23a7da84@pengutronix.de \
--to=jre@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=eagle.alexander923@gmail.com \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox