diff options
Diffstat (limited to 'drivers/clk/msm/clock.h')
| -rw-r--r-- | drivers/clk/msm/clock.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/drivers/clk/msm/clock.h b/drivers/clk/msm/clock.h new file mode 100644 index 000000000000..6d286a5d2e5b --- /dev/null +++ b/drivers/clk/msm/clock.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2013-2014, 2016, The Linux Foundation. All rights reserved. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#ifndef __DRIVERS_CLK_MSM_CLOCK_H +#define __DRIVERS_CLK_MSM_CLOCK_H + +#include <linux/clkdev.h> + +/** + * struct clock_init_data - SoC specific clock initialization data + * @table: table of lookups to add + * @size: size of @table + * @pre_init: called before initializing the clock driver. + * @post_init: called after registering @table. clock APIs can be called inside. + * @late_init: called during late init + */ +struct clock_init_data { + struct list_head list; + struct clk_lookup *table; + size_t size; + void (*pre_init)(void); + void (*post_init)(void); + int (*late_init)(void); +}; + +int msm_clock_init(struct clock_init_data *data); +int find_vdd_level(struct clk *clk, unsigned long rate); +extern struct list_head orphan_clk_list; + +#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_COMMON_CLK_MSM) +int clock_debug_register(struct clk *clk); +void clock_debug_print_enabled(void); +#elif defined(CONFIG_DEBUG_FS) && defined(CONFIG_COMMON_CLK_QCOM) +void clock_debug_print_enabled(void); +#else +static inline int clock_debug_register(struct clk *unused) +{ + return 0; +} +static inline void clock_debug_print_enabled(void) { return; } +#endif + +#endif |
