blob: 33219b82543674c1491b7745c83b52fa5564abe5 (
plain)
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
53
|
/*
* Copyright (C) 2013 Spreadtrum Communications Inc.
*
* 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 __ASM_ARCH_AUDIO_POWER_H
#define __ASM_ARCH_AUDIO_POWER_H
#define FIXED_AUDIO_POWER 1
/* power setting */
static inline int arch_audio_power_write_mask(int reg, int val, int mask)
{
int ret = 0;
#if FIXED_AUDIO_POWER
ret = arch_audio_codec_write_mask(reg, val, mask);
#endif
return ret;
}
static inline int arch_audio_power_write(int reg, int val)
{
int ret = 0;
#if FIXED_AUDIO_POWER
ret = arch_audio_codec_write(reg, val);
#endif
return ret;
}
static inline int arch_audio_power_read(int reg)
{
int ret = 0;
#if FIXED_AUDIO_POWER
ret = arch_audio_codec_read(reg);
#endif
return ret;
}
#endif
|