blob: 139c75648eae5a2c670b49a397886a84231fe0c9 [file] [log] [blame]
Junjie Wu8deb7902013-07-05 22:31:56 -07001/* Copyright (c) 2011,2013, The Linux Foundation. All rights reserved.
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
Matt Wagantall33d01f52012-02-23 23:27:44 -080013#include <mach/clk-provider.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070014
15static int dummy_clk_reset(struct clk *clk, enum clk_reset_action action)
16{
17 return 0;
18}
19
Matt Wagantall9de3bfb2011-11-03 20:13:12 -070020static int dummy_clk_set_rate(struct clk *clk, unsigned long rate)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070021{
Junjie Wu8deb7902013-07-05 22:31:56 -070022 clk->rate = rate;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070023 return 0;
24}
25
Matt Wagantall9de3bfb2011-11-03 20:13:12 -070026static int dummy_clk_set_max_rate(struct clk *clk, unsigned long rate)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070027{
28 return 0;
29}
30
31static int dummy_clk_set_flags(struct clk *clk, unsigned flags)
32{
33 return 0;
34}
35
Matt Wagantall9de3bfb2011-11-03 20:13:12 -070036static unsigned long dummy_clk_get_rate(struct clk *clk)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070037{
Junjie Wu8deb7902013-07-05 22:31:56 -070038 return clk->rate;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070039}
40
Matt Wagantall9de3bfb2011-11-03 20:13:12 -070041static long dummy_clk_round_rate(struct clk *clk, unsigned long rate)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070042{
43 return rate;
44}
45
Junjie Wu8deb7902013-07-05 22:31:56 -070046struct clk_ops clk_ops_dummy = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070047 .reset = dummy_clk_reset,
48 .set_rate = dummy_clk_set_rate,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070049 .set_max_rate = dummy_clk_set_max_rate,
50 .set_flags = dummy_clk_set_flags,
51 .get_rate = dummy_clk_get_rate,
52 .round_rate = dummy_clk_round_rate,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070053};
54
55struct clk dummy_clk = {
56 .dbg_name = "dummy_clk",
57 .ops = &clk_ops_dummy,
58 CLK_INIT(dummy_clk),
59};