ASoC: codecs: add tc358749x codec driver
[firefly-linux-kernel-4.4.55.git] / sound / soc / codecs / tc358749x.h
1 /*
2  * tc358749x.h TC358749XBG ALSA SoC audio codec driver
3  *
4  * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd
5  * Author: Roy <luoxiaotan@rock-chips.com>
6  *
7  * This program is free software; you can redistribute it and/or modify it
8  * under the terms and conditions of the GNU General Public License,
9  * version 2, as published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
14  * more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program.  If not, see <http://www.gnu.org/licenses/>.*
18  */
19
20 #ifndef _TC358749X_H
21 #define _TC358749X_H
22
23 #define TC358749X_FORCE_MUTE            0x8600
24 #define MUTE                            0x1
25 #define FORCE_DMUTE_MASK                BIT(0)
26 #define FORCE_AMUTE_MASK                BIT(4)
27
28 #define TC358749X_FS_SET                0x8621
29 #define FS_SET_MASK                     0xf
30 #define FS_44100                        0x0
31 #define FS_48000                        0x2
32 #define FS_32000                        0x3
33 #define FS_22050                        0x4
34 #define FS_24000                        0x6
35 #define FS_88200                        0x8
36 #define FS_96000                        0xa
37 #define FS_176400                       0xc
38 #define FS_192000                       0xe
39
40 struct tc358749x_priv {
41         struct regmap                   *regmap;
42         struct i2c_client               *client;
43         struct device                   *dev;
44         struct gpio_desc                *gpio_power;
45         struct gpio_desc                *gpio_power18;
46         struct gpio_desc                *gpio_power33;
47         struct gpio_desc                *gpio_csi_ctl;
48         struct gpio_desc                *gpio_reset;
49         struct gpio_desc                *gpio_stanby;
50         struct gpio_desc                *gpio_int;
51 };
52
53 #endif