blob: cc8ee395ba4d3e430e984f0350437d62e390bd44 [file] [log] [blame]
Vidyakumar Athota5d45f4c2019-03-10 22:35:07 -07001/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * Copyright (c) 2019, The Linux Foundation. All rights reserved.
4 */
5
6#ifndef BOLERO_CLK_RSC_H
7#define BOLERO_CLK_RSC_H
8
9#include <linux/regmap.h>
10#include <dt-bindings/sound/qcom,bolero-clk-rsc.h>
11
12#if IS_ENABLED(CONFIG_SND_SOC_BOLERO)
13int bolero_clk_rsc_mgr_init(void);
14void bolero_clk_rsc_mgr_exit(void);
15void bolero_clk_rsc_fs_gen_request(struct device *dev,
16 bool enable);
17int bolero_clk_rsc_request_clock(struct device *dev,
18 int default_clk_id,
19 int clk_id_req,
20 bool enable);
Meng Wang8ef0cc22019-05-08 15:12:56 +080021int bolero_rsc_clk_reset(struct device *dev, int clk_id);
Aditya Bavanaricfc65e82019-10-03 22:34:23 +053022void bolero_clk_rsc_enable_all_clocks(struct device *dev, bool enable);
Vidyakumar Athota5d45f4c2019-03-10 22:35:07 -070023#else
24static inline void bolero_clk_rsc_fs_gen_request(struct device *dev,
25 bool enable)
26{
27}
28static inline int bolero_clk_rsc_mgr_init(void)
29{
30 return 0;
31}
32static inline void bolero_clk_rsc_mgr_exit(void)
33{
34}
35static inline int bolero_clk_rsc_request_clock(struct device *dev,
36 int default_clk_id,
37 int clk_id_req,
38 bool enable)
39{
40 return 0;
41}
Meng Wang8ef0cc22019-05-08 15:12:56 +080042static inline int bolero_rsc_clk_reset(struct device *dev, int clk_id)
43{
44 return 0;
45}
Aditya Bavanaricfc65e82019-10-03 22:34:23 +053046static inline void bolero_clk_rsc_enable_all_clocks(struct device *dev,
47 bool enable)
48{
49 return;
50}
Vidyakumar Athota5d45f4c2019-03-10 22:35:07 -070051#endif /* CONFIG_SND_SOC_BOLERO */
52#endif /* BOLERO_CLK_RSC_H */