From: Tero Kristo <t-kristo@ti.com>
To: <linux-clk@vger.kernel.org>, <sboyd@kernel.org>,
<mturquette@baylibre.com>
Cc: <linux-omap@vger.kernel.org>, <tony@atomide.com>
Subject: [PATCH 2/4] clk: ti: add new API for checking if a provided clock is an OMAP clock
Date: Tue, 15 Jan 2019 11:15:13 +0200 [thread overview]
Message-ID: <1547543715-16467-3-git-send-email-t-kristo@ti.com> (raw)
In-Reply-To: <1547543715-16467-1-git-send-email-t-kristo@ti.com>
omap2_clk_is_hw_omap can now be used to verify if the provided clk_hw
is an omap HW clock or not. This is done to replace the usage of CLK_IS_BASIC
flag within the TI clock drivers.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
drivers/clk/ti/clk.c | 18 ++++++++++++++++++
drivers/clk/ti/clock.h | 1 +
2 files changed, 19 insertions(+)
diff --git a/drivers/clk/ti/clk.c b/drivers/clk/ti/clk.c
index 8172843..05f9d1a 100644
--- a/drivers/clk/ti/clk.c
+++ b/drivers/clk/ti/clk.c
@@ -559,3 +559,22 @@ int omap2_clk_for_each(int (*fn)(struct clk_hw_omap *hw))
return ret;
}
+
+/**
+ * omap2_clk_is_hw_omap - check if the provided clk_hw is OMAP clock
+ * @hw: clk_hw to check if it is an omap clock or not
+ *
+ * Checks if the provided clk_hw is OMAP clock or not. Returns true if
+ * it is, false otherwise.
+ */
+bool omap2_clk_is_hw_omap(struct clk_hw *hw)
+{
+ struct clk_hw_omap *oclk;
+
+ list_for_each_entry(oclk, &clk_hw_omap_clocks, node) {
+ if (&oclk->hw == hw)
+ return true;
+ }
+
+ return false;
+}
diff --git a/drivers/clk/ti/clock.h b/drivers/clk/ti/clock.h
index e5b8af3..034ff6a 100644
--- a/drivers/clk/ti/clock.h
+++ b/drivers/clk/ti/clock.h
@@ -302,6 +302,7 @@ long omap4_dpll_regm4xen_round_rate(struct clk_hw *hw,
int omap4_dpll_regm4xen_determine_rate(struct clk_hw *hw,
struct clk_rate_request *req);
int omap2_clk_for_each(int (*fn)(struct clk_hw_omap *hw));
+bool omap2_clk_is_hw_omap(struct clk_hw *hw);
extern struct ti_clk_ll_ops *ti_clk_ll_ops;
--
1.9.1
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
next prev parent reply other threads:[~2019-01-15 9:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-15 9:15 [PATCH 0/4] clk: ti: get rid of CLK_IS_BASIC Tero Kristo
2019-01-15 9:15 ` [PATCH 1/4] clk: ti: move clk_hw_omap list handling under generic part of the driver Tero Kristo
2019-01-15 9:15 ` Tero Kristo [this message]
2019-01-15 9:15 ` [PATCH 3/4] clk: ti: remove usage of CLK_IS_BASIC Tero Kristo
2019-01-15 9:15 ` [PATCH 4/4] clk: ti: generalize the init sequence of clk_hw_omap clocks Tero Kristo
2019-01-15 18:20 ` [PATCH 0/4] clk: ti: get rid of CLK_IS_BASIC Tony Lindgren
2019-01-15 18:31 ` Tero Kristo
2019-01-15 20:24 ` Andreas Kemnade
2019-01-21 19:58 ` Tony Lindgren
2019-02-15 19:19 ` Tero Kristo
2019-02-22 19:50 ` Stephen Boyd
2019-02-25 7:18 ` Tero Kristo
2019-02-25 17:12 ` Stephen Boyd
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=1547543715-16467-3-git-send-email-t-kristo@ti.com \
--to=t-kristo@ti.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
--cc=tony@atomide.com \
/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