1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
*/
#ifndef BOLERO_CLK_RSC_H
#define BOLERO_CLK_RSC_H
#include <linux/regmap.h>
#include <dt-bindings/sound/qcom,bolero-clk-rsc.h>
#if IS_ENABLED(CONFIG_SND_SOC_BOLERO)
int bolero_clk_rsc_mgr_init(void);
void bolero_clk_rsc_mgr_exit(void);
void bolero_clk_rsc_fs_gen_request(struct device *dev,
bool enable);
int bolero_clk_rsc_request_clock(struct device *dev,
int default_clk_id,
int clk_id_req,
bool enable);
int bolero_rsc_clk_reset(struct device *dev, int clk_id);
void bolero_clk_rsc_enable_all_clocks(struct device *dev, bool enable);
#else
static inline void bolero_clk_rsc_fs_gen_request(struct device *dev,
bool enable)
{
}
static inline int bolero_clk_rsc_mgr_init(void)
{
return 0;
}
static inline void bolero_clk_rsc_mgr_exit(void)
{
}
static inline int bolero_clk_rsc_request_clock(struct device *dev,
int default_clk_id,
int clk_id_req,
bool enable)
{
return 0;
}
static inline int bolero_rsc_clk_reset(struct device *dev, int clk_id)
{
return 0;
}
static inline void bolero_clk_rsc_enable_all_clocks(struct device *dev,
bool enable)
{
return;
}
#endif /* CONFIG_SND_SOC_BOLERO */
#endif /* BOLERO_CLK_RSC_H */
|