From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 12/14] clk: Add Linux functions to register a fixed factor clock
Date: Tue, 18 May 2021 13:49:27 +0200 [thread overview]
Message-ID: <20210518114929.12964-13-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20210518114929.12964-1-s.hauer@pengutronix.de>
Linux has clk_register_fixed_factor(). Add the same function with the same
prototype for barebox to ease code porting from Linux.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/clk/clk-fixed-factor.c | 7 +++++++
include/linux/clk.h | 3 +++
2 files changed, 10 insertions(+)
diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c
index 4f1a07c629..fd4a3805f1 100644
--- a/drivers/clk/clk-fixed-factor.c
+++ b/drivers/clk/clk-fixed-factor.c
@@ -77,6 +77,13 @@ struct clk *clk_fixed_factor(const char *name,
return &f->hw.clk;
}
+struct clk *clk_register_fixed_factor(struct device_d *dev, const char *name,
+ const char *parent_name, unsigned long flags,
+ unsigned int mult, unsigned int div)
+{
+ return clk_fixed_factor(name, parent_name, mult, div, flags);
+}
+
/**
* of_fixed_factor_clk_setup() - Setup function for simple fixed factor clock
*/
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 04dd4b0116..01bda4d94f 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -509,6 +509,9 @@ extern struct clk_ops clk_fixed_factor_ops;
struct clk *clk_fixed_factor(const char *name,
const char *parent, unsigned int mult, unsigned int div,
unsigned flags);
+struct clk *clk_register_fixed_factor(struct device_d *dev, const char *name,
+ const char *parent_name, unsigned long flags,
+ unsigned int mult, unsigned int div);
/**
* struct clk_fractional_divider - adjustable fractional divider clock
--
2.29.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-05-18 11:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-18 11:49 [PATCH 00/14] clk updates Sascha Hauer
2021-05-18 11:49 ` [PATCH 01/14] clk: introduce clk init op Sascha Hauer
2021-05-18 11:57 ` Ahmad Fatoum
2021-05-18 11:49 ` [PATCH 02/14] clk: rename clk_register() to bclk_register() Sascha Hauer
2021-05-18 12:06 ` Ahmad Fatoum
2021-05-18 11:49 ` [PATCH 03/14] clk: introduce struct clk_hw Sascha Hauer
2021-05-18 12:17 ` Ahmad Fatoum
2021-05-19 6:55 ` Sascha Hauer
2021-05-18 11:49 ` [PATCH 04/14] clk: introduce clk_register() Sascha Hauer
2021-05-18 12:21 ` Ahmad Fatoum
2021-05-18 11:49 ` [PATCH 05/14] clk: divider: Add ro ops Sascha Hauer
2021-05-18 12:21 ` Ahmad Fatoum
2021-05-18 11:49 ` [PATCH 06/14] clk: mux: " Sascha Hauer
2021-05-18 11:49 ` [PATCH 07/14] clk: move fixed_factor to include/linux/clk.h Sascha Hauer
2021-05-18 11:49 ` [PATCH 08/14] Add rational_best_approximation() Sascha Hauer
2021-05-18 12:23 ` Ahmad Fatoum
2021-05-18 11:49 ` [PATCH 09/14] clk: Update fractional divider from Linux Sascha Hauer
2021-05-18 11:49 ` [PATCH 10/14] clk: Add lock to different clock types Sascha Hauer
2021-05-18 11:49 ` [PATCH 11/14] clk: Add Linux functions to register a divider Sascha Hauer
2021-05-18 11:49 ` Sascha Hauer [this message]
2021-05-18 11:49 ` [PATCH 13/14] clk: Add Linux functions to register a gate Sascha Hauer
2021-05-18 11:49 ` [PATCH 14/14] clk: Add Linux functions to register a mux 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=20210518114929.12964-13-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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