hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/sound/soc/codecs/max9867.h
....@@ -1,11 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * max9867.h -- MAX9867 ALSA SoC Audio driver
34 *
45 * Copyright 2013-2015 Maxim Integrated Products
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
96 */
107
118 #ifndef _MAX9867_H
....@@ -26,13 +23,11 @@
2623 #define MAX9867_PSCLK_10_20 0x1
2724 #define MAX9867_PSCLK_20_40 0x2
2825 #define MAX9867_PSCLK_40_60 0x3
29
-#define MAX9867_AUDIOCLKHIGH 0x06
30
-#define MAX9867_NI_HIGH_WIDTH 0x7
31
-#define MAX9867_NI_HIGH_MASK 0x7F
32
-#define MAX9867_NI_LOW_MASK 0x7F
33
-#define MAX9867_NI_LOW_SHIFT 0x1
34
-#define MAX9867_PLL (1<<7)
35
-#define MAX9867_AUDIOCLKLOW 0x07
26
+#define MAX9867_AUDIOCLKHIGH 0x06
27
+#define MAX9867_NI_HIGH_MASK 0x7F
28
+#define MAX9867_NI_LOW_MASK 0xFE
29
+#define MAX9867_PLL (1<<7)
30
+#define MAX9867_AUDIOCLKLOW 0x07
3631 #define MAX9867_RAPID_LOCK 0x01
3732 #define MAX9867_IFC1A 0x08
3833 #define MAX9867_MASTER (1<<7)
....@@ -43,40 +38,30 @@
4338 #define MAX9867_BCI_MODE (1<<5)
4439 #define MAX9867_IFC1B 0x09
4540 #define MAX9867_IFC1B_BCLK_MASK 7
46
-#define MAX9867_IFC1B_32BIT 0x01
47
-#define MAX9867_IFC1B_24BIT 0x02
48
-#define MAX9867_IFC1B_PCLK_2 4
49
-#define MAX9867_IFC1B_PCLK_4 5
50
-#define MAX9867_IFC1B_PCLK_8 6
51
-#define MAX9867_IFC1B_PCLK_16 7
52
-#define MAX9867_CODECFLTR 0x0a
53
-#define MAX9867_DACGAIN 0x0b
41
+#define MAX9867_IFC1B_64X 0x01
42
+#define MAX9867_IFC1B_48X 0x02
43
+#define MAX9867_IFC1B_PCLK_2 0x04
44
+#define MAX9867_IFC1B_PCLK_4 0x05
45
+#define MAX9867_IFC1B_PCLK_8 0x06
46
+#define MAX9867_IFC1B_PCLK_16 0x07
47
+#define MAX9867_CODECFLTR 0x0a
48
+#define MAX9867_CODECFLTR_MODE (1<<7)
49
+#define MAX9867_SIDETONE 0x0b
5450 #define MAX9867_DACLEVEL 0x0c
55
-#define MAX9867_DAC_MUTE_SHIFT 0x6
56
-#define MAX9867_DAC_MUTE_WIDTH 0x1
57
-#define MAX9867_DAC_MUTE_MASK (0x1<<MAX9867_DAC_MUTE_SHIFT)
5851 #define MAX9867_ADCLEVEL 0x0d
5952 #define MAX9867_LEFTLINELVL 0x0e
60
-#define MAX9867_RIGTHLINELVL 0x0f
53
+#define MAX9867_RIGHTLINELVL 0x0f
6154 #define MAX9867_LEFTVOL 0x10
6255 #define MAX9867_RIGHTVOL 0x11
6356 #define MAX9867_LEFTMICGAIN 0x12
6457 #define MAX9867_RIGHTMICGAIN 0x13
6558 #define MAX9867_INPUTCONFIG 0x14
66
-#define MAX9867_INPUT_SHIFT 0x6
6759 #define MAX9867_MICCONFIG 0x15
6860 #define MAX9867_MODECONFIG 0x16
6961 #define MAX9867_PWRMAN 0x17
70
-#define MAX9867_SHTDOWN 0x80
62
+#define MAX9867_PWRMAN_SHDN (1<<7)
7163 #define MAX9867_REVISION 0xff
7264
7365 #define MAX9867_CACHEREGNUM 10
7466
75
-/* codec private data */
76
-struct max9867_priv {
77
- struct regmap *regmap;
78
- unsigned int sysclk;
79
- unsigned int pclk;
80
- unsigned int master;
81
-};
8267 #endif