~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/soc/codecs/da7219-aad.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /sound/soc/codecs/da7219-aad.h (Version linux-6.12-rc7) and /sound/soc/codecs/da7219-aad.h (Version linux-5.18.19)


  1 /* SPDX-License-Identifier: GPL-2.0-or-later *      1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 /*                                                  2 /*
  3  * da7219-aad.h - DA7322 ASoC AAD Driver            3  * da7219-aad.h - DA7322 ASoC AAD Driver
  4  *                                                  4  *
  5  * Copyright (c) 2015 Dialog Semiconductor Ltd      5  * Copyright (c) 2015 Dialog Semiconductor Ltd.
  6  *                                                  6  *
  7  * Author: Adam Thomson <Adam.Thomson.Opensour      7  * Author: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
  8  */                                                 8  */
  9                                                     9 
 10 #ifndef __DA7219_AAD_H                             10 #ifndef __DA7219_AAD_H
 11 #define __DA7219_AAD_H                             11 #define __DA7219_AAD_H
 12                                                    12 
 13 #include <linux/timer.h>                           13 #include <linux/timer.h>
 14 #include <linux/mutex.h>                       << 
 15 #include <sound/soc.h>                             14 #include <sound/soc.h>
 16 #include <sound/jack.h>                            15 #include <sound/jack.h>
 17 #include <sound/da7219-aad.h>                      16 #include <sound/da7219-aad.h>
 18                                                    17 
 19 /*                                                 18 /*
 20  * Registers                                       19  * Registers
 21  */                                                20  */
 22                                                    21 
 23 #define DA7219_ACCDET_STATUS_A          0xC0       22 #define DA7219_ACCDET_STATUS_A          0xC0
 24 #define DA7219_ACCDET_STATUS_B          0xC1       23 #define DA7219_ACCDET_STATUS_B          0xC1
 25 #define DA7219_ACCDET_IRQ_EVENT_A       0xC2       24 #define DA7219_ACCDET_IRQ_EVENT_A       0xC2
 26 #define DA7219_ACCDET_IRQ_EVENT_B       0xC3       25 #define DA7219_ACCDET_IRQ_EVENT_B       0xC3
 27 #define DA7219_ACCDET_IRQ_MASK_A        0xC4       26 #define DA7219_ACCDET_IRQ_MASK_A        0xC4
 28 #define DA7219_ACCDET_IRQ_MASK_B        0xC5       27 #define DA7219_ACCDET_IRQ_MASK_B        0xC5
 29 #define DA7219_ACCDET_CONFIG_1          0xC6       28 #define DA7219_ACCDET_CONFIG_1          0xC6
 30 #define DA7219_ACCDET_CONFIG_2          0xC7       29 #define DA7219_ACCDET_CONFIG_2          0xC7
 31 #define DA7219_ACCDET_CONFIG_3          0xC8       30 #define DA7219_ACCDET_CONFIG_3          0xC8
 32 #define DA7219_ACCDET_CONFIG_4          0xC9       31 #define DA7219_ACCDET_CONFIG_4          0xC9
 33 #define DA7219_ACCDET_CONFIG_5          0xCA       32 #define DA7219_ACCDET_CONFIG_5          0xCA
 34 #define DA7219_ACCDET_CONFIG_6          0xCB       33 #define DA7219_ACCDET_CONFIG_6          0xCB
 35 #define DA7219_ACCDET_CONFIG_7          0xCC       34 #define DA7219_ACCDET_CONFIG_7          0xCC
 36 #define DA7219_ACCDET_CONFIG_8          0xCD       35 #define DA7219_ACCDET_CONFIG_8          0xCD
 37                                                    36 
 38                                                    37 
 39 /*                                                 38 /*
 40  * Bit Fields                                      39  * Bit Fields
 41  */                                                40  */
 42                                                    41 
 43 /* DA7219_ACCDET_STATUS_A = 0xC0 */                42 /* DA7219_ACCDET_STATUS_A = 0xC0 */
 44 #define DA7219_JACK_INSERTION_STS_SHIFT 0          43 #define DA7219_JACK_INSERTION_STS_SHIFT 0
 45 #define DA7219_JACK_INSERTION_STS_MASK  (0x1 <     44 #define DA7219_JACK_INSERTION_STS_MASK  (0x1 << 0)
 46 #define DA7219_JACK_TYPE_STS_SHIFT      1          45 #define DA7219_JACK_TYPE_STS_SHIFT      1
 47 #define DA7219_JACK_TYPE_STS_MASK       (0x1 <     46 #define DA7219_JACK_TYPE_STS_MASK       (0x1 << 1)
 48 #define DA7219_JACK_PIN_ORDER_STS_SHIFT 2          47 #define DA7219_JACK_PIN_ORDER_STS_SHIFT 2
 49 #define DA7219_JACK_PIN_ORDER_STS_MASK  (0x1 <     48 #define DA7219_JACK_PIN_ORDER_STS_MASK  (0x1 << 2)
 50 #define DA7219_MICBIAS_UP_STS_SHIFT     3          49 #define DA7219_MICBIAS_UP_STS_SHIFT     3
 51 #define DA7219_MICBIAS_UP_STS_MASK      (0x1 <     50 #define DA7219_MICBIAS_UP_STS_MASK      (0x1 << 3)
 52                                                    51 
 53 /* DA7219_ACCDET_STATUS_B = 0xC1 */                52 /* DA7219_ACCDET_STATUS_B = 0xC1 */
 54 #define DA7219_BUTTON_TYPE_STS_SHIFT    0          53 #define DA7219_BUTTON_TYPE_STS_SHIFT    0
 55 #define DA7219_BUTTON_TYPE_STS_MASK     (0xFF      54 #define DA7219_BUTTON_TYPE_STS_MASK     (0xFF << 0)
 56                                                    55 
 57 /* DA7219_ACCDET_IRQ_EVENT_A = 0xC2 */             56 /* DA7219_ACCDET_IRQ_EVENT_A = 0xC2 */
 58 #define DA7219_E_JACK_INSERTED_SHIFT               57 #define DA7219_E_JACK_INSERTED_SHIFT            0
 59 #define DA7219_E_JACK_INSERTED_MASK                58 #define DA7219_E_JACK_INSERTED_MASK             (0x1 << 0)
 60 #define DA7219_E_JACK_REMOVED_SHIFT                59 #define DA7219_E_JACK_REMOVED_SHIFT             1
 61 #define DA7219_E_JACK_REMOVED_MASK                 60 #define DA7219_E_JACK_REMOVED_MASK              (0x1 << 1)
 62 #define DA7219_E_JACK_DETECT_COMPLETE_SHIFT        61 #define DA7219_E_JACK_DETECT_COMPLETE_SHIFT     2
 63 #define DA7219_E_JACK_DETECT_COMPLETE_MASK         62 #define DA7219_E_JACK_DETECT_COMPLETE_MASK      (0x1 << 2)
 64                                                    63 
 65 /* DA7219_ACCDET_IRQ_EVENT_B = 0xC3 */             64 /* DA7219_ACCDET_IRQ_EVENT_B = 0xC3 */
 66 #define DA7219_E_BUTTON_A_PRESSED_SHIFT            65 #define DA7219_E_BUTTON_A_PRESSED_SHIFT         0
 67 #define DA7219_E_BUTTON_A_PRESSED_MASK             66 #define DA7219_E_BUTTON_A_PRESSED_MASK          (0x1 << 0)
 68 #define DA7219_E_BUTTON_B_PRESSED_SHIFT            67 #define DA7219_E_BUTTON_B_PRESSED_SHIFT         1
 69 #define DA7219_E_BUTTON_B_PRESSED_MASK             68 #define DA7219_E_BUTTON_B_PRESSED_MASK          (0x1 << 1)
 70 #define DA7219_E_BUTTON_C_PRESSED_SHIFT            69 #define DA7219_E_BUTTON_C_PRESSED_SHIFT         2
 71 #define DA7219_E_BUTTON_C_PRESSED_MASK             70 #define DA7219_E_BUTTON_C_PRESSED_MASK          (0x1 << 2)
 72 #define DA7219_E_BUTTON_D_PRESSED_SHIFT            71 #define DA7219_E_BUTTON_D_PRESSED_SHIFT         3
 73 #define DA7219_E_BUTTON_D_PRESSED_MASK             72 #define DA7219_E_BUTTON_D_PRESSED_MASK          (0x1 << 3)
 74 #define DA7219_E_BUTTON_D_RELEASED_SHIFT           73 #define DA7219_E_BUTTON_D_RELEASED_SHIFT        4
 75 #define DA7219_E_BUTTON_D_RELEASED_MASK            74 #define DA7219_E_BUTTON_D_RELEASED_MASK         (0x1 << 4)
 76 #define DA7219_E_BUTTON_C_RELEASED_SHIFT           75 #define DA7219_E_BUTTON_C_RELEASED_SHIFT        5
 77 #define DA7219_E_BUTTON_C_RELEASED_MASK            76 #define DA7219_E_BUTTON_C_RELEASED_MASK         (0x1 << 5)
 78 #define DA7219_E_BUTTON_B_RELEASED_SHIFT           77 #define DA7219_E_BUTTON_B_RELEASED_SHIFT        6
 79 #define DA7219_E_BUTTON_B_RELEASED_MASK            78 #define DA7219_E_BUTTON_B_RELEASED_MASK         (0x1 << 6)
 80 #define DA7219_E_BUTTON_A_RELEASED_SHIFT           79 #define DA7219_E_BUTTON_A_RELEASED_SHIFT        7
 81 #define DA7219_E_BUTTON_A_RELEASED_MASK            80 #define DA7219_E_BUTTON_A_RELEASED_MASK         (0x1 << 7)
 82                                                    81 
 83 /* DA7219_ACCDET_IRQ_MASK_A = 0xC4 */              82 /* DA7219_ACCDET_IRQ_MASK_A = 0xC4 */
 84 #define DA7219_M_JACK_INSERTED_SHIFT               83 #define DA7219_M_JACK_INSERTED_SHIFT            0
 85 #define DA7219_M_JACK_INSERTED_MASK                84 #define DA7219_M_JACK_INSERTED_MASK             (0x1 << 0)
 86 #define DA7219_M_JACK_REMOVED_SHIFT                85 #define DA7219_M_JACK_REMOVED_SHIFT             1
 87 #define DA7219_M_JACK_REMOVED_MASK                 86 #define DA7219_M_JACK_REMOVED_MASK              (0x1 << 1)
 88 #define DA7219_M_JACK_DETECT_COMPLETE_SHIFT        87 #define DA7219_M_JACK_DETECT_COMPLETE_SHIFT     2
 89 #define DA7219_M_JACK_DETECT_COMPLETE_MASK         88 #define DA7219_M_JACK_DETECT_COMPLETE_MASK      (0x1 << 2)
 90                                                    89 
 91 /* DA7219_ACCDET_IRQ_MASK_B = 0xC5 */              90 /* DA7219_ACCDET_IRQ_MASK_B = 0xC5 */
 92 #define DA7219_M_BUTTON_A_PRESSED_SHIFT            91 #define DA7219_M_BUTTON_A_PRESSED_SHIFT         0
 93 #define DA7219_M_BUTTON_A_PRESSED_MASK             92 #define DA7219_M_BUTTON_A_PRESSED_MASK          (0x1 << 0)
 94 #define DA7219_M_BUTTON_B_PRESSED_SHIFT            93 #define DA7219_M_BUTTON_B_PRESSED_SHIFT         1
 95 #define DA7219_M_BUTTON_B_PRESSED_MASK             94 #define DA7219_M_BUTTON_B_PRESSED_MASK          (0x1 << 1)
 96 #define DA7219_M_BUTTON_C_PRESSED_SHIFT            95 #define DA7219_M_BUTTON_C_PRESSED_SHIFT         2
 97 #define DA7219_M_BUTTON_C_PRESSED_MASK             96 #define DA7219_M_BUTTON_C_PRESSED_MASK          (0x1 << 2)
 98 #define DA7219_M_BUTTON_D_PRESSED_SHIFT            97 #define DA7219_M_BUTTON_D_PRESSED_SHIFT         3
 99 #define DA7219_M_BUTTON_D_PRESSED_MASK             98 #define DA7219_M_BUTTON_D_PRESSED_MASK          (0x1 << 3)
100 #define DA7219_M_BUTTON_D_RELEASED_SHIFT           99 #define DA7219_M_BUTTON_D_RELEASED_SHIFT        4
101 #define DA7219_M_BUTTON_D_RELEASED_MASK           100 #define DA7219_M_BUTTON_D_RELEASED_MASK         (0x1 << 4)
102 #define DA7219_M_BUTTON_C_RELEASED_SHIFT          101 #define DA7219_M_BUTTON_C_RELEASED_SHIFT        5
103 #define DA7219_M_BUTTON_C_RELEASED_MASK           102 #define DA7219_M_BUTTON_C_RELEASED_MASK         (0x1 << 5)
104 #define DA7219_M_BUTTON_B_RELEASED_SHIFT          103 #define DA7219_M_BUTTON_B_RELEASED_SHIFT        6
105 #define DA7219_M_BUTTON_B_RELEASED_MASK           104 #define DA7219_M_BUTTON_B_RELEASED_MASK         (0x1 << 6)
106 #define DA7219_M_BUTTON_A_RELEASED_SHIFT          105 #define DA7219_M_BUTTON_A_RELEASED_SHIFT        7
107 #define DA7219_M_BUTTON_A_RELEASED_MASK           106 #define DA7219_M_BUTTON_A_RELEASED_MASK         (0x1 << 7)
108                                                   107 
109 /* DA7219_ACCDET_CONFIG_1 = 0xC6 */               108 /* DA7219_ACCDET_CONFIG_1 = 0xC6 */
110 #define DA7219_ACCDET_EN_SHIFT          0         109 #define DA7219_ACCDET_EN_SHIFT          0
111 #define DA7219_ACCDET_EN_MASK           (0x1 <    110 #define DA7219_ACCDET_EN_MASK           (0x1 << 0)
112 #define DA7219_BUTTON_CONFIG_SHIFT      1         111 #define DA7219_BUTTON_CONFIG_SHIFT      1
113 #define DA7219_BUTTON_CONFIG_MASK       (0x7 <    112 #define DA7219_BUTTON_CONFIG_MASK       (0x7 << 1)
114 #define DA7219_MIC_DET_THRESH_SHIFT     4         113 #define DA7219_MIC_DET_THRESH_SHIFT     4
115 #define DA7219_MIC_DET_THRESH_MASK      (0x3 <    114 #define DA7219_MIC_DET_THRESH_MASK      (0x3 << 4)
116 #define DA7219_JACK_TYPE_DET_EN_SHIFT   6         115 #define DA7219_JACK_TYPE_DET_EN_SHIFT   6
117 #define DA7219_JACK_TYPE_DET_EN_MASK    (0x1 <    116 #define DA7219_JACK_TYPE_DET_EN_MASK    (0x1 << 6)
118 #define DA7219_PIN_ORDER_DET_EN_SHIFT   7         117 #define DA7219_PIN_ORDER_DET_EN_SHIFT   7
119 #define DA7219_PIN_ORDER_DET_EN_MASK    (0x1 <    118 #define DA7219_PIN_ORDER_DET_EN_MASK    (0x1 << 7)
120                                                   119 
121 /* DA7219_ACCDET_CONFIG_2 = 0xC7 */               120 /* DA7219_ACCDET_CONFIG_2 = 0xC7 */
122 #define DA7219_ACCDET_PAUSE_SHIFT       0         121 #define DA7219_ACCDET_PAUSE_SHIFT       0
123 #define DA7219_ACCDET_PAUSE_MASK        (0x1 <    122 #define DA7219_ACCDET_PAUSE_MASK        (0x1 << 0)
124 #define DA7219_JACKDET_DEBOUNCE_SHIFT   1         123 #define DA7219_JACKDET_DEBOUNCE_SHIFT   1
125 #define DA7219_JACKDET_DEBOUNCE_MASK    (0x7 <    124 #define DA7219_JACKDET_DEBOUNCE_MASK    (0x7 << 1)
126 #define DA7219_JACK_DETECT_RATE_SHIFT   4         125 #define DA7219_JACK_DETECT_RATE_SHIFT   4
127 #define DA7219_JACK_DETECT_RATE_MASK    (0x3 <    126 #define DA7219_JACK_DETECT_RATE_MASK    (0x3 << 4)
128 #define DA7219_JACKDET_REM_DEB_SHIFT    6         127 #define DA7219_JACKDET_REM_DEB_SHIFT    6
129 #define DA7219_JACKDET_REM_DEB_MASK     (0x3 <    128 #define DA7219_JACKDET_REM_DEB_MASK     (0x3 << 6)
130                                                   129 
131 /* DA7219_ACCDET_CONFIG_3 = 0xC8 */               130 /* DA7219_ACCDET_CONFIG_3 = 0xC8 */
132 #define DA7219_A_D_BUTTON_THRESH_SHIFT  0         131 #define DA7219_A_D_BUTTON_THRESH_SHIFT  0
133 #define DA7219_A_D_BUTTON_THRESH_MASK   (0xFF     132 #define DA7219_A_D_BUTTON_THRESH_MASK   (0xFF << 0)
134                                                   133 
135 /* DA7219_ACCDET_CONFIG_4 = 0xC9 */               134 /* DA7219_ACCDET_CONFIG_4 = 0xC9 */
136 #define DA7219_D_B_BUTTON_THRESH_SHIFT  0         135 #define DA7219_D_B_BUTTON_THRESH_SHIFT  0
137 #define DA7219_D_B_BUTTON_THRESH_MASK   (0xFF     136 #define DA7219_D_B_BUTTON_THRESH_MASK   (0xFF << 0)
138                                                   137 
139 /* DA7219_ACCDET_CONFIG_5 = 0xCA */               138 /* DA7219_ACCDET_CONFIG_5 = 0xCA */
140 #define DA7219_B_C_BUTTON_THRESH_SHIFT  0         139 #define DA7219_B_C_BUTTON_THRESH_SHIFT  0
141 #define DA7219_B_C_BUTTON_THRESH_MASK   (0xFF     140 #define DA7219_B_C_BUTTON_THRESH_MASK   (0xFF << 0)
142                                                   141 
143 /* DA7219_ACCDET_CONFIG_6 = 0xCB */               142 /* DA7219_ACCDET_CONFIG_6 = 0xCB */
144 #define DA7219_C_MIC_BUTTON_THRESH_SHIFT          143 #define DA7219_C_MIC_BUTTON_THRESH_SHIFT        0
145 #define DA7219_C_MIC_BUTTON_THRESH_MASK           144 #define DA7219_C_MIC_BUTTON_THRESH_MASK         (0xFF << 0)
146                                                   145 
147 /* DA7219_ACCDET_CONFIG_7 = 0xCC */               146 /* DA7219_ACCDET_CONFIG_7 = 0xCC */
148 #define DA7219_BUTTON_AVERAGE_SHIFT     0         147 #define DA7219_BUTTON_AVERAGE_SHIFT     0
149 #define DA7219_BUTTON_AVERAGE_MASK      (0x3 <    148 #define DA7219_BUTTON_AVERAGE_MASK      (0x3 << 0)
150 #define DA7219_ADC_1_BIT_REPEAT_SHIFT   2         149 #define DA7219_ADC_1_BIT_REPEAT_SHIFT   2
151 #define DA7219_ADC_1_BIT_REPEAT_MASK    (0x3 <    150 #define DA7219_ADC_1_BIT_REPEAT_MASK    (0x3 << 2)
152 #define DA7219_PIN_ORDER_FORCE_SHIFT    4         151 #define DA7219_PIN_ORDER_FORCE_SHIFT    4
153 #define DA7219_PIN_ORDER_FORCE_MASK     (0x1 <    152 #define DA7219_PIN_ORDER_FORCE_MASK     (0x1 << 4)
154 #define DA7219_JACK_TYPE_FORCE_SHIFT    5         153 #define DA7219_JACK_TYPE_FORCE_SHIFT    5
155 #define DA7219_JACK_TYPE_FORCE_MASK     (0x1 <    154 #define DA7219_JACK_TYPE_FORCE_MASK     (0x1 << 5)
156                                                   155 
157 /* DA7219_ACCDET_CONFIG_8 = 0xCD */               156 /* DA7219_ACCDET_CONFIG_8 = 0xCD */
158 #define DA7219_HPTEST_EN_SHIFT          0         157 #define DA7219_HPTEST_EN_SHIFT          0
159 #define DA7219_HPTEST_EN_MASK           (0x1 <    158 #define DA7219_HPTEST_EN_MASK           (0x1 << 0)
160 #define DA7219_HPTEST_RES_SEL_SHIFT     1         159 #define DA7219_HPTEST_RES_SEL_SHIFT     1
161 #define DA7219_HPTEST_RES_SEL_MASK      (0x3 <    160 #define DA7219_HPTEST_RES_SEL_MASK      (0x3 << 1)
162 #define DA7219_HPTEST_RES_SEL_1KOHMS    (0x0 <    161 #define DA7219_HPTEST_RES_SEL_1KOHMS    (0x0 << 1)
163 #define DA7219_HPTEST_COMP_SHIFT        4         162 #define DA7219_HPTEST_COMP_SHIFT        4
164 #define DA7219_HPTEST_COMP_MASK         (0x1 <    163 #define DA7219_HPTEST_COMP_MASK         (0x1 << 4)
165                                                   164 
166                                                   165 
167 #define DA7219_AAD_MAX_BUTTONS          4         166 #define DA7219_AAD_MAX_BUTTONS          4
168 #define DA7219_AAD_REPORT_ALL_MASK      (SND_J    167 #define DA7219_AAD_REPORT_ALL_MASK      (SND_JACK_MECHANICAL |                  \
169                                          SND_J    168                                          SND_JACK_HEADSET | SND_JACK_LINEOUT |  \
170                                          SND_J    169                                          SND_JACK_BTN_0 | SND_JACK_BTN_1 |      \
171                                          SND_J    170                                          SND_JACK_BTN_2 | SND_JACK_BTN_3)
172                                                   171 
173 #define DA7219_AAD_MICBIAS_CHK_DELAY    10        172 #define DA7219_AAD_MICBIAS_CHK_DELAY    10
174 #define DA7219_AAD_MICBIAS_CHK_RETRIES  5         173 #define DA7219_AAD_MICBIAS_CHK_RETRIES  5
175                                                   174 
176 #define DA7219_AAD_HPTEST_RAMP_FREQ               175 #define DA7219_AAD_HPTEST_RAMP_FREQ             0x28
177 #define DA7219_AAD_HPTEST_RAMP_FREQ_INT_OSC       176 #define DA7219_AAD_HPTEST_RAMP_FREQ_INT_OSC     0x4D
178 #define DA7219_AAD_HPTEST_PERIOD                  177 #define DA7219_AAD_HPTEST_PERIOD                65
179 #define DA7219_AAD_HPTEST_INT_OSC_PATH_DELAY      178 #define DA7219_AAD_HPTEST_INT_OSC_PATH_DELAY    20
180                                                   179 
181 enum da7219_aad_event_regs {                      180 enum da7219_aad_event_regs {
182         DA7219_AAD_IRQ_REG_A = 0,                 181         DA7219_AAD_IRQ_REG_A = 0,
183         DA7219_AAD_IRQ_REG_B,                     182         DA7219_AAD_IRQ_REG_B,
184         DA7219_AAD_IRQ_REG_MAX,                   183         DA7219_AAD_IRQ_REG_MAX,
185 };                                                184 };
186                                                   185 
187 /* Private data */                                186 /* Private data */
188 struct da7219_aad_priv {                          187 struct da7219_aad_priv {
189         struct snd_soc_component *component;      188         struct snd_soc_component *component;
190         int irq;                                  189         int irq;
191         int gnd_switch_delay;                  << 
192                                                   190 
193         u8 micbias_pulse_lvl;                     191         u8 micbias_pulse_lvl;
194         u32 micbias_pulse_time;                   192         u32 micbias_pulse_time;
195                                                   193 
196         u8 btn_cfg;                               194         u8 btn_cfg;
197                                                   195 
198         struct work_struct btn_det_work;          196         struct work_struct btn_det_work;
199         struct work_struct hptest_work;           197         struct work_struct hptest_work;
200         struct delayed_work jack_det_work;     << 
201         struct workqueue_struct *aad_wq;       << 
202                                                   198 
203         struct snd_soc_jack *jack;                199         struct snd_soc_jack *jack;
204         bool micbias_resume_enable;               200         bool micbias_resume_enable;
205         bool jack_inserted;                       201         bool jack_inserted;
206 };                                                202 };
207                                                   203 
208 /* AAD control */                                 204 /* AAD control */
209 void da7219_aad_jack_det(struct snd_soc_compon    205 void da7219_aad_jack_det(struct snd_soc_component *component, struct snd_soc_jack *jack);
210                                                   206 
211 /* Suspend/Resume */                              207 /* Suspend/Resume */
212 void da7219_aad_suspend(struct snd_soc_compone    208 void da7219_aad_suspend(struct snd_soc_component *component);
213 void da7219_aad_resume(struct snd_soc_componen    209 void da7219_aad_resume(struct snd_soc_component *component);
214                                                   210 
215 /* Init/Exit */                                   211 /* Init/Exit */
216 int da7219_aad_init(struct snd_soc_component *    212 int da7219_aad_init(struct snd_soc_component *component);
217 void da7219_aad_exit(struct snd_soc_component     213 void da7219_aad_exit(struct snd_soc_component *component);
218                                                   214 
219 /* I2C Probe */                                   215 /* I2C Probe */
220 int da7219_aad_probe(struct i2c_client *i2c);     216 int da7219_aad_probe(struct i2c_client *i2c);
221                                                   217 
222 #endif /* __DA7219_AAD_H */                       218 #endif /* __DA7219_AAD_H */
223                                                   219 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php