~ [ 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-4.20.17)


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

~ [ 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