diff options
author | Mark Brown <broonie@linaro.org> | 2013-08-29 10:13:28 -0400 |
---|---|---|
committer | Mike Turquette <mturquette@linaro.org> | 2013-08-29 20:29:01 -0400 |
commit | a5828a6c5f51a909c3c4dbbf22c76c75a033b2e9 (patch) | |
tree | 7a99a4e68ce5f197b289cd82afbfb447a884604c | |
parent | e2815b048aa05bc2e1c0a49ffd23ebed47e9c813 (diff) |
clk: wm831x: Provide is_prepared() rather than is_enabled()
Since the driver was written an is_prepared() operation has been made
possible. Since the driver uses I2C I/O only prepare operations are
provided so move the is_enabled() operation over to is_prepared().
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
-rw-r--r-- | drivers/clk/clk-wm831x.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/clk/clk-wm831x.c b/drivers/clk/clk-wm831x.c index 1b3f8c9b98cc..c370ecb6b685 100644 --- a/drivers/clk/clk-wm831x.c +++ b/drivers/clk/clk-wm831x.c | |||
@@ -31,7 +31,7 @@ struct wm831x_clk { | |||
31 | bool xtal_ena; | 31 | bool xtal_ena; |
32 | }; | 32 | }; |
33 | 33 | ||
34 | static int wm831x_xtal_is_enabled(struct clk_hw *hw) | 34 | static int wm831x_xtal_is_prepared(struct clk_hw *hw) |
35 | { | 35 | { |
36 | struct wm831x_clk *clkdata = container_of(hw, struct wm831x_clk, | 36 | struct wm831x_clk *clkdata = container_of(hw, struct wm831x_clk, |
37 | xtal_hw); | 37 | xtal_hw); |
@@ -52,7 +52,7 @@ static unsigned long wm831x_xtal_recalc_rate(struct clk_hw *hw, | |||
52 | } | 52 | } |
53 | 53 | ||
54 | static const struct clk_ops wm831x_xtal_ops = { | 54 | static const struct clk_ops wm831x_xtal_ops = { |
55 | .is_enabled = wm831x_xtal_is_enabled, | 55 | .is_prepared = wm831x_xtal_is_prepared, |
56 | .recalc_rate = wm831x_xtal_recalc_rate, | 56 | .recalc_rate = wm831x_xtal_recalc_rate, |
57 | }; | 57 | }; |
58 | 58 | ||
@@ -73,7 +73,7 @@ static const unsigned long wm831x_fll_auto_rates[] = { | |||
73 | 24576000, | 73 | 24576000, |
74 | }; | 74 | }; |
75 | 75 | ||
76 | static int wm831x_fll_is_enabled(struct clk_hw *hw) | 76 | static int wm831x_fll_is_prepared(struct clk_hw *hw) |
77 | { | 77 | { |
78 | struct wm831x_clk *clkdata = container_of(hw, struct wm831x_clk, | 78 | struct wm831x_clk *clkdata = container_of(hw, struct wm831x_clk, |
79 | fll_hw); | 79 | fll_hw); |
@@ -170,7 +170,7 @@ static int wm831x_fll_set_rate(struct clk_hw *hw, unsigned long rate, | |||
170 | if (i == ARRAY_SIZE(wm831x_fll_auto_rates)) | 170 | if (i == ARRAY_SIZE(wm831x_fll_auto_rates)) |
171 | return -EINVAL; | 171 | return -EINVAL; |
172 | 172 | ||
173 | if (wm831x_fll_is_enabled(hw)) | 173 | if (wm831x_fll_is_prepared(hw)) |
174 | return -EPERM; | 174 | return -EPERM; |
175 | 175 | ||
176 | return wm831x_set_bits(wm831x, WM831X_CLOCK_CONTROL_2, | 176 | return wm831x_set_bits(wm831x, WM831X_CLOCK_CONTROL_2, |
@@ -220,7 +220,7 @@ static u8 wm831x_fll_get_parent(struct clk_hw *hw) | |||
220 | } | 220 | } |
221 | 221 | ||
222 | static const struct clk_ops wm831x_fll_ops = { | 222 | static const struct clk_ops wm831x_fll_ops = { |
223 | .is_enabled = wm831x_fll_is_enabled, | 223 | .is_prepared = wm831x_fll_is_prepared, |
224 | .prepare = wm831x_fll_prepare, | 224 | .prepare = wm831x_fll_prepare, |
225 | .unprepare = wm831x_fll_unprepare, | 225 | .unprepare = wm831x_fll_unprepare, |
226 | .round_rate = wm831x_fll_round_rate, | 226 | .round_rate = wm831x_fll_round_rate, |
@@ -237,7 +237,7 @@ static struct clk_init_data wm831x_fll_init = { | |||
237 | .flags = CLK_SET_RATE_GATE, | 237 | .flags = CLK_SET_RATE_GATE, |
238 | }; | 238 | }; |
239 | 239 | ||
240 | static int wm831x_clkout_is_enabled(struct clk_hw *hw) | 240 | static int wm831x_clkout_is_prepared(struct clk_hw *hw) |
241 | { | 241 | { |
242 | struct wm831x_clk *clkdata = container_of(hw, struct wm831x_clk, | 242 | struct wm831x_clk *clkdata = container_of(hw, struct wm831x_clk, |
243 | clkout_hw); | 243 | clkout_hw); |
@@ -335,7 +335,7 @@ static int wm831x_clkout_set_parent(struct clk_hw *hw, u8 parent) | |||
335 | } | 335 | } |
336 | 336 | ||
337 | static const struct clk_ops wm831x_clkout_ops = { | 337 | static const struct clk_ops wm831x_clkout_ops = { |
338 | .is_enabled = wm831x_clkout_is_enabled, | 338 | .is_prepared = wm831x_clkout_is_prepared, |
339 | .prepare = wm831x_clkout_prepare, | 339 | .prepare = wm831x_clkout_prepare, |
340 | .unprepare = wm831x_clkout_unprepare, | 340 | .unprepare = wm831x_clkout_unprepare, |
341 | .get_parent = wm831x_clkout_get_parent, | 341 | .get_parent = wm831x_clkout_get_parent, |