diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-11-20 06:12:26 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-02-12 12:32:39 -0500 |
commit | 0321cb83e1c3f3a4282bd620c6cec78c5b80b572 (patch) | |
tree | 5a72693de37c889cb5339a1556cd4ab5967a0864 /arch/arm/mach-pnx4008/i2c.c | |
parent | a0dcf19f59d4f37150a6b7e115925d72aca15293 (diff) |
ARM: PNX4008: move i2c clock start/stop into driver
Acked-by: Vitaly Wool <vitalywool@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pnx4008/i2c.c')
-rw-r--r-- | arch/arm/mach-pnx4008/i2c.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/arch/arm/mach-pnx4008/i2c.c b/arch/arm/mach-pnx4008/i2c.c index 707d819f1280..14b4906bec2f 100644 --- a/arch/arm/mach-pnx4008/i2c.c +++ b/arch/arm/mach-pnx4008/i2c.c | |||
@@ -18,36 +18,6 @@ | |||
18 | #include <mach/irqs.h> | 18 | #include <mach/irqs.h> |
19 | #include <mach/i2c.h> | 19 | #include <mach/i2c.h> |
20 | 20 | ||
21 | static int set_clock_run(struct platform_device *pdev) | ||
22 | { | ||
23 | struct clk *clk; | ||
24 | int retval = 0; | ||
25 | |||
26 | clk = clk_get(&pdev->dev, NULL); | ||
27 | if (!IS_ERR(clk)) { | ||
28 | clk_set_rate(clk, 1); | ||
29 | clk_put(clk); | ||
30 | } else | ||
31 | retval = -ENOENT; | ||
32 | |||
33 | return retval; | ||
34 | } | ||
35 | |||
36 | static int set_clock_stop(struct platform_device *pdev) | ||
37 | { | ||
38 | struct clk *clk; | ||
39 | int retval = 0; | ||
40 | |||
41 | clk = clk_get(&pdev->dev, NULL); | ||
42 | if (!IS_ERR(clk)) { | ||
43 | clk_set_rate(clk, 0); | ||
44 | clk_put(clk); | ||
45 | } else | ||
46 | retval = -ENOENT; | ||
47 | |||
48 | return retval; | ||
49 | } | ||
50 | |||
51 | static u32 calculate_input_freq(struct platform_device *pdev) | 21 | static u32 calculate_input_freq(struct platform_device *pdev) |
52 | { | 22 | { |
53 | return HCLK_MHZ; | 23 | return HCLK_MHZ; |
@@ -85,22 +55,16 @@ static struct i2c_adapter pnx_adapter2 = { | |||
85 | 55 | ||
86 | static struct i2c_pnx_data i2c0_data = { | 56 | static struct i2c_pnx_data i2c0_data = { |
87 | .calculate_input_freq = calculate_input_freq, | 57 | .calculate_input_freq = calculate_input_freq, |
88 | .set_clock_run = set_clock_run, | ||
89 | .set_clock_stop = set_clock_stop, | ||
90 | .adapter = &pnx_adapter0, | 58 | .adapter = &pnx_adapter0, |
91 | }; | 59 | }; |
92 | 60 | ||
93 | static struct i2c_pnx_data i2c1_data = { | 61 | static struct i2c_pnx_data i2c1_data = { |
94 | .calculate_input_freq = calculate_input_freq, | 62 | .calculate_input_freq = calculate_input_freq, |
95 | .set_clock_run = set_clock_run, | ||
96 | .set_clock_stop = set_clock_stop, | ||
97 | .adapter = &pnx_adapter1, | 63 | .adapter = &pnx_adapter1, |
98 | }; | 64 | }; |
99 | 65 | ||
100 | static struct i2c_pnx_data i2c2_data = { | 66 | static struct i2c_pnx_data i2c2_data = { |
101 | .calculate_input_freq = calculate_input_freq, | 67 | .calculate_input_freq = calculate_input_freq, |
102 | .set_clock_run = set_clock_run, | ||
103 | .set_clock_stop = set_clock_stop, | ||
104 | .adapter = &pnx_adapter2, | 68 | .adapter = &pnx_adapter2, |
105 | }; | 69 | }; |
106 | 70 | ||