From 8e4bff4cab0ddac6060645b0715210484d02ff40 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Wed, 30 Aug 2017 08:25:59 +0000 Subject: Initial file dump from open source release --- include/soc/sprd/__sprd_audio_power.h | 53 +++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 include/soc/sprd/__sprd_audio_power.h (limited to 'include/soc/sprd/__sprd_audio_power.h') diff --git a/include/soc/sprd/__sprd_audio_power.h b/include/soc/sprd/__sprd_audio_power.h new file mode 100644 index 00000000..33219b82 --- /dev/null +++ b/include/soc/sprd/__sprd_audio_power.h @@ -0,0 +1,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 -- cgit v1.3.1