From: Florian Fainelli <f.fainelli@gmail.com>
To: gabriel.fernandez@st.com, Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Russell King <linux@armlinux.org.uk>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@st.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@codeaurora.org>,
Nicolas Pitre <nico@linaro.org>, Arnd Bergmann <arnd@arndb.de>,
daniel.thompson@linaro.org, andrea.merello@gmail.com,
radoslaw.pietrzyk@gmail.com, Lee Jones <lee.jones@linaro.org>
Cc: devicetree@vger.kernel.org, amelie.delaunay@st.com,
olivier.bideau@st.com, linux-kernel@vger.kernel.org,
linux-clk@vger.kernel.org, gabriel.fernandez.st@gmail.com,
linux-arm-kernel@lists.infradead.org, ludovic.barre@st.com
Subject: Re: [PATCH v5 1/2] clk: gate: expose clk_gate_ops::is_enabled
Date: Thu, 13 Jul 2017 10:22:15 -0700 [thread overview]
Message-ID: <efa06f77-7b0e-9902-dbf1-c76d3203b813@gmail.com> (raw)
In-Reply-To: <1499954552-20075-2-git-send-email-gabriel.fernandez@st.com>
On 07/13/2017 07:02 AM, gabriel.fernandez@st.com wrote:
> From: Gabriel Fernandez <gabriel.fernandez@st.com>
>
> This patch exposes clk_gate_ops::is_enabled as functions
> that can be directly called and assigned in places like this so
> we don't need wrapper functions that do nothing besides forward
> the call.
>
> Signed-off-by: Gabriel Fernandez <gabriel.fernandez@st.com>
> Sugested by Stephen Boyd <sboyd@codeaurora.org>
> ---
> drivers/clk/clk-gate.c | 2 +-
> include/linux/clk-provider.h | 1 +
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clk/clk-gate.c b/drivers/clk/clk-gate.c
> index 4e0c054a..e27e28f 100644
> --- a/drivers/clk/clk-gate.c
> +++ b/drivers/clk/clk-gate.c
> @@ -86,7 +86,7 @@ static void clk_gate_disable(struct clk_hw *hw)
> clk_gate_endisable(hw, 0);
> }
>
> -static int clk_gate_is_enabled(struct clk_hw *hw)
> +int clk_gate_is_enabled(struct clk_hw *hw)
> {
> u32 reg;
> struct clk_gate *gate = to_clk_gate(hw);
Don't you need to add an EXPORT_SYMBOL_GPL(clk_gate_is_enabled) as well
in case this gets used by modules?
> diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
> index c59c625..e9587ab 100644
> --- a/include/linux/clk-provider.h
> +++ b/include/linux/clk-provider.h
> @@ -343,6 +343,7 @@ struct clk_hw *clk_hw_register_gate(struct device *dev, const char *name,
> u8 clk_gate_flags, spinlock_t *lock);
> void clk_unregister_gate(struct clk *clk);
> void clk_hw_unregister_gate(struct clk_hw *hw);
> +int clk_gate_is_enabled(struct clk_hw *hw);
>
> struct clk_div_table {
> unsigned int val;
>
--
Florian
next prev parent reply other threads:[~2017-07-13 17:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-13 14:02 [PATCH v5 0/2] clk: stm32h7: Add stm32h743 clock driver gabriel.fernandez
2017-07-13 14:02 ` [PATCH v5 1/2] clk: gate: expose clk_gate_ops::is_enabled gabriel.fernandez
2017-07-13 17:22 ` Florian Fainelli [this message]
2017-07-14 1:16 ` Stephen Boyd
2017-07-14 18:52 ` kbuild test robot
2017-07-17 7:30 ` Gabriel FERNANDEZ
2017-07-18 1:17 ` Stephen Boyd
2017-07-13 14:02 ` [PATCH v5 2/2] clk: stm32h7: Add stm32h743 clock driver gabriel.fernandez
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=efa06f77-7b0e-9902-dbf1-c76d3203b813@gmail.com \
--to=f.fainelli@gmail.com \
--cc=alexandre.torgue@st.com \
--cc=amelie.delaunay@st.com \
--cc=andrea.merello@gmail.com \
--cc=arnd@arndb.de \
--cc=daniel.thompson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=gabriel.fernandez.st@gmail.com \
--cc=gabriel.fernandez@st.com \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=ludovic.barre@st.com \
--cc=mark.rutland@arm.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=mturquette@baylibre.com \
--cc=nico@linaro.org \
--cc=olivier.bideau@st.com \
--cc=radoslaw.pietrzyk@gmail.com \
--cc=robh+dt@kernel.org \
--cc=sboyd@codeaurora.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;
as well as URLs for NNTP newsgroup(s).