From: Amit Singh Tomar <atomar25opensource@gmail.com>
To: u-boot@lists.denx.de
Cc: andre.przywara@arm.com, manivannan.sadhasivam@linaro.org,
joe.hershberger@ni.com, jh80.chung@samsung.com,
Amit Singh Tomar <amittomer25@gmail.com>
Subject: [PATCH v4 1/6] clk: actions: Introduce dummy get/set_rate callbacks
Date: Sun, 28 Nov 2021 17:02:20 +0530 [thread overview]
Message-ID: <20211128113225.3992-2-atomar25opensource@gmail.com> (raw)
In-Reply-To: <20211128113225.3992-1-atomar25opensource@gmail.com>
From: Amit Singh Tomar <amittomer25@gmail.com>
This commit introduces get/set_rate callbacks, these are dummy at
the moment, and can be used to get/set clock for various devices
based on the clk id.
Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
---
Changes since v3:
* No changes.
Changes since v2:
* No changes.
Changes since previous version:
* Removed premature initialization to avoid
compiler warnings.
---
drivers/clk/owl/clk_owl.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/drivers/clk/owl/clk_owl.c b/drivers/clk/owl/clk_owl.c
index 96ab7fed1f37..f78e5fa3f08d 100644
--- a/drivers/clk/owl/clk_owl.c
+++ b/drivers/clk/owl/clk_owl.c
@@ -128,6 +128,30 @@ int owl_clk_disable(struct clk *clk)
return 0;
}
+static ulong owl_clk_get_rate(struct clk *clk)
+{
+ ulong rate;
+
+ switch (clk->id) {
+ default:
+ return -ENOENT;
+ }
+
+ return rate;
+}
+
+static ulong owl_clk_set_rate(struct clk *clk, ulong rate)
+{
+ ulong new_rate;
+
+ switch (clk->id) {
+ default:
+ return -ENOENT;
+ }
+
+ return new_rate;
+}
+
static int owl_clk_probe(struct udevice *dev)
{
struct owl_clk_priv *priv = dev_get_priv(dev);
@@ -145,6 +169,8 @@ static int owl_clk_probe(struct udevice *dev)
static const struct clk_ops owl_clk_ops = {
.enable = owl_clk_enable,
.disable = owl_clk_disable,
+ .get_rate = owl_clk_get_rate,
+ .set_rate = owl_clk_set_rate,
};
static const struct udevice_id owl_clk_ids[] = {
--
2.27.0
next prev parent reply other threads:[~2021-11-28 11:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-28 11:32 [PATCH v4 0/6] Add MMC/SD support for S700/S900 Amit Singh Tomar
2021-11-28 11:32 ` Amit Singh Tomar [this message]
2022-01-15 17:44 ` [PATCH v4 1/6] clk: actions: Introduce dummy get/set_rate callbacks Sean Anderson
2022-01-18 21:09 ` Tom Rini
2021-11-28 11:32 ` [PATCH v4 2/6] clk: actions: Add SD/MMC clocks Amit Singh Tomar
2022-01-15 17:44 ` Sean Anderson
2022-01-18 21:09 ` Tom Rini
2021-11-28 11:32 ` [PATCH v4 3/6] ARM: dts: sync Actions Semi S700 DT from Linux 5.10-rc7 Amit Singh Tomar
2021-11-29 16:13 ` Tom Rini
2021-12-02 18:23 ` [PATCH v4 3/6] ARM: dts: sync Actions Semi S700 DT from Linux v5.16-rc3 Amit Singh Tomar
2022-01-18 21:09 ` Tom Rini
2021-11-28 11:32 ` [PATCH v4 4/6] ARM: dts: s700: add MMC/SD controller node Amit Singh Tomar
2022-01-05 17:43 ` Tom Rini
2022-01-18 21:09 ` Tom Rini
2021-11-28 11:32 ` [PATCH v4 5/6] mmc: actions: add MMC driver for Actions OWL S700/S900 Amit Singh Tomar
2022-01-18 21:09 ` Tom Rini
2021-11-28 11:32 ` [PATCH v4 6/6] configs: Enable mmc support Amit Singh Tomar
2022-01-18 21:09 ` Tom Rini
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=20211128113225.3992-2-atomar25opensource@gmail.com \
--to=atomar25opensource@gmail.com \
--cc=amittomer25@gmail.com \
--cc=andre.przywara@arm.com \
--cc=jh80.chung@samsung.com \
--cc=joe.hershberger@ni.com \
--cc=manivannan.sadhasivam@linaro.org \
--cc=u-boot@lists.denx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.