aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/sound/max98357a.txt6
-rw-r--r--sound/soc/codecs/adav80x.c2
-rw-r--r--sound/soc/codecs/alc5632.c2
-rw-r--r--sound/soc/codecs/da7210.c6
-rw-r--r--sound/soc/codecs/da7213.c2
-rw-r--r--sound/soc/codecs/da732x.c2
-rw-r--r--sound/soc/codecs/da9055.c2
-rw-r--r--sound/soc/codecs/isabelle.c2
-rw-r--r--sound/soc/codecs/lm49453.c2
-rw-r--r--sound/soc/codecs/max9768.c2
-rw-r--r--sound/soc/codecs/max98090.c80
-rw-r--r--sound/soc/codecs/max98095.c318
-rw-r--r--sound/soc/codecs/max98357a.c23
-rw-r--r--sound/soc/codecs/max9877.c18
-rw-r--r--sound/soc/codecs/max98925.c3
-rw-r--r--sound/soc/codecs/ml26124.c2
-rw-r--r--sound/soc/codecs/rt286.c4
-rw-r--r--sound/soc/codecs/rt5651.c2
-rw-r--r--sound/soc/codecs/tas2552.c2
-rw-r--r--sound/soc/codecs/tfa9879.c2
-rw-r--r--sound/soc/codecs/wm2200.c2
-rw-r--r--sound/soc/codecs/wm8962.c2
-rw-r--r--sound/soc/codecs/wm8993.c4
-rw-r--r--sound/soc/codecs/wm8996.c2
-rw-r--r--sound/soc/codecs/wm9081.c2
25 files changed, 78 insertions, 416 deletions
diff --git a/Documentation/devicetree/bindings/sound/max98357a.txt b/Documentation/devicetree/bindings/sound/max98357a.txt
index a7a149a236e5..28645a2ff885 100644
--- a/Documentation/devicetree/bindings/sound/max98357a.txt
+++ b/Documentation/devicetree/bindings/sound/max98357a.txt
@@ -4,7 +4,11 @@ This node models the Maxim MAX98357A DAC.
4 4
5Required properties: 5Required properties:
6- compatible : "maxim,max98357a" 6- compatible : "maxim,max98357a"
7- sdmode-gpios : GPIO specifier for the GPIO -> DAC SDMODE pin 7
8Optional properties:
9- sdmode-gpios : GPIO specifier for the chip's SD_MODE pin.
10 If this option is not specified then driver does not manage
11 the pin state (e.g. chip is always on).
8 12
9Example: 13Example:
10 14
diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c
index 69c63b92e078..198c924551b7 100644
--- a/sound/soc/codecs/adav80x.c
+++ b/sound/soc/codecs/adav80x.c
@@ -113,7 +113,7 @@
113 113
114#define ADAV80X_PLL_OUTE_SYSCLKPD(x) BIT(2 - (x)) 114#define ADAV80X_PLL_OUTE_SYSCLKPD(x) BIT(2 - (x))
115 115
116static struct reg_default adav80x_reg_defaults[] = { 116static const struct reg_default adav80x_reg_defaults[] = {
117 { ADAV80X_PLAYBACK_CTRL, 0x01 }, 117 { ADAV80X_PLAYBACK_CTRL, 0x01 },
118 { ADAV80X_AUX_IN_CTRL, 0x01 }, 118 { ADAV80X_AUX_IN_CTRL, 0x01 },
119 { ADAV80X_REC_CTRL, 0x02 }, 119 { ADAV80X_REC_CTRL, 0x02 },
diff --git a/sound/soc/codecs/alc5632.c b/sound/soc/codecs/alc5632.c
index 9277ac68b696..ef6de511dc7e 100644
--- a/sound/soc/codecs/alc5632.c
+++ b/sound/soc/codecs/alc5632.c
@@ -35,7 +35,7 @@
35/* 35/*
36 * ALC5632 register cache 36 * ALC5632 register cache
37 */ 37 */
38static struct reg_default alc5632_reg_defaults[] = { 38static const struct reg_default alc5632_reg_defaults[] = {
39 { 2, 0x8080 }, /* R2 - Speaker Output Volume */ 39 { 2, 0x8080 }, /* R2 - Speaker Output Volume */
40 { 4, 0x8080 }, /* R4 - Headphone Output Volume */ 40 { 4, 0x8080 }, /* R4 - Headphone Output Volume */
41 { 6, 0x8080 }, /* R6 - AUXOUT Volume */ 41 { 6, 0x8080 }, /* R6 - AUXOUT Volume */
diff --git a/sound/soc/codecs/da7210.c b/sound/soc/codecs/da7210.c
index 9c7b41a8642d..457ed82d3e10 100644
--- a/sound/soc/codecs/da7210.c
+++ b/sound/soc/codecs/da7210.c
@@ -680,7 +680,7 @@ struct da7210_priv {
680 int master; 680 int master;
681}; 681};
682 682
683static struct reg_default da7210_reg_defaults[] = { 683static const struct reg_default da7210_reg_defaults[] = {
684 { 0x00, 0x00 }, 684 { 0x00, 0x00 },
685 { 0x01, 0x11 }, 685 { 0x01, 0x11 },
686 { 0x03, 0x00 }, 686 { 0x03, 0x00 },
@@ -1182,7 +1182,7 @@ static struct snd_soc_codec_driver soc_codec_dev_da7210 = {
1182 1182
1183#if IS_ENABLED(CONFIG_I2C) 1183#if IS_ENABLED(CONFIG_I2C)
1184 1184
1185static struct reg_default da7210_regmap_i2c_patch[] = { 1185static const struct reg_default da7210_regmap_i2c_patch[] = {
1186 1186
1187 /* System controller master disable */ 1187 /* System controller master disable */
1188 { DA7210_STARTUP1, 0x00 }, 1188 { DA7210_STARTUP1, 0x00 },
@@ -1268,7 +1268,7 @@ static struct i2c_driver da7210_i2c_driver = {
1268 1268
1269#if defined(CONFIG_SPI_MASTER) 1269#if defined(CONFIG_SPI_MASTER)
1270 1270
1271static struct reg_default da7210_regmap_spi_patch[] = { 1271static const struct reg_default da7210_regmap_spi_patch[] = {
1272 /* Dummy read to give two pulses over nCS for SPI */ 1272 /* Dummy read to give two pulses over nCS for SPI */
1273 { DA7210_AUX2, 0x00 }, 1273 { DA7210_AUX2, 0x00 },
1274 { DA7210_AUX2, 0x00 }, 1274 { DA7210_AUX2, 0x00 },
diff --git a/sound/soc/codecs/da7213.c b/sound/soc/codecs/da7213.c
index f635401b7730..47fc3bec8a9c 100644
--- a/sound/soc/codecs/da7213.c
+++ b/sound/soc/codecs/da7213.c
@@ -954,7 +954,7 @@ static const struct snd_soc_dapm_route da7213_audio_map[] = {
954 {"LINE", NULL, "Lineout PGA"}, 954 {"LINE", NULL, "Lineout PGA"},
955}; 955};
956 956
957static struct reg_default da7213_reg_defaults[] = { 957static const struct reg_default da7213_reg_defaults[] = {
958 { DA7213_DIG_ROUTING_DAI, 0x10 }, 958 { DA7213_DIG_ROUTING_DAI, 0x10 },
959 { DA7213_SR, 0x0A }, 959 { DA7213_SR, 0x0A },
960 { DA7213_REFERENCES, 0x80 }, 960 { DA7213_REFERENCES, 0x80 },
diff --git a/sound/soc/codecs/da732x.c b/sound/soc/codecs/da732x.c
index 295f0c71f1f5..1d5a89c5164b 100644
--- a/sound/soc/codecs/da732x.c
+++ b/sound/soc/codecs/da732x.c
@@ -43,7 +43,7 @@ struct da732x_priv {
43/* 43/*
44 * da732x register cache - default settings 44 * da732x register cache - default settings
45 */ 45 */
46static struct reg_default da732x_reg_cache[] = { 46static const struct reg_default da732x_reg_cache[] = {
47 { DA732X_REG_REF1 , 0x02 }, 47 { DA732X_REG_REF1 , 0x02 },
48 { DA732X_REG_BIAS_EN , 0x80 }, 48 { DA732X_REG_BIAS_EN , 0x80 },
49 { DA732X_REG_BIAS1 , 0x00 }, 49 { DA732X_REG_BIAS1 , 0x00 },
diff --git a/sound/soc/codecs/da9055.c b/sound/soc/codecs/da9055.c
index ede9bc42fc7c..19635d830b47 100644
--- a/sound/soc/codecs/da9055.c
+++ b/sound/soc/codecs/da9055.c
@@ -948,7 +948,7 @@ struct da9055_priv {
948 struct da9055_platform_data *pdata; 948 struct da9055_platform_data *pdata;
949}; 949};
950 950
951static struct reg_default da9055_reg_defaults[] = { 951static const struct reg_default da9055_reg_defaults[] = {
952 { 0x21, 0x10 }, 952 { 0x21, 0x10 },
953 { 0x22, 0x0A }, 953 { 0x22, 0x0A },
954 { 0x23, 0x00 }, 954 { 0x23, 0x00 },
diff --git a/sound/soc/codecs/isabelle.c b/sound/soc/codecs/isabelle.c
index 6bb8e6b627df..be448373d39a 100644
--- a/sound/soc/codecs/isabelle.c
+++ b/sound/soc/codecs/isabelle.c
@@ -33,7 +33,7 @@
33 33
34 34
35/* Register default values for ISABELLE driver. */ 35/* Register default values for ISABELLE driver. */
36static struct reg_default isabelle_reg_defs[] = { 36static const struct reg_default isabelle_reg_defs[] = {
37 { 0, 0x00 }, 37 { 0, 0x00 },
38 { 1, 0x00 }, 38 { 1, 0x00 },
39 { 2, 0x00 }, 39 { 2, 0x00 },
diff --git a/sound/soc/codecs/lm49453.c b/sound/soc/codecs/lm49453.c
index af4e35e4e727..9af5640e3446 100644
--- a/sound/soc/codecs/lm49453.c
+++ b/sound/soc/codecs/lm49453.c
@@ -30,7 +30,7 @@
30#include <asm/div64.h> 30#include <asm/div64.h>
31#include "lm49453.h" 31#include "lm49453.h"
32 32
33static struct reg_default lm49453_reg_defs[] = { 33static const struct reg_default lm49453_reg_defs[] = {
34 { 0, 0x00 }, 34 { 0, 0x00 },
35 { 1, 0x00 }, 35 { 1, 0x00 },
36 { 2, 0x00 }, 36 { 2, 0x00 },
diff --git a/sound/soc/codecs/max9768.c b/sound/soc/codecs/max9768.c
index 4c300f317c3a..bd41128c6f0b 100644
--- a/sound/soc/codecs/max9768.c
+++ b/sound/soc/codecs/max9768.c
@@ -35,7 +35,7 @@ struct max9768 {
35 u32 flags; 35 u32 flags;
36}; 36};
37 37
38static struct reg_default max9768_default_regs[] = { 38static const struct reg_default max9768_default_regs[] = {
39 { 0, 0 }, 39 { 0, 0 },
40 { 3, MAX9768_CTRL_FILTERLESS}, 40 { 3, MAX9768_CTRL_FILTERLESS},
41}; 41};
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
index e09c13065f82..cdf534e7a285 100644
--- a/sound/soc/codecs/max98090.c
+++ b/sound/soc/codecs/max98090.c
@@ -267,75 +267,8 @@ static bool max98090_volatile_register(struct device *dev, unsigned int reg)
267static bool max98090_readable_register(struct device *dev, unsigned int reg) 267static bool max98090_readable_register(struct device *dev, unsigned int reg)
268{ 268{
269 switch (reg) { 269 switch (reg) {
270 case M98090_REG_DEVICE_STATUS: 270 case M98090_REG_DEVICE_STATUS ... M98090_REG_INTERRUPT_S:
271 case M98090_REG_JACK_STATUS: 271 case M98090_REG_LINE_INPUT_CONFIG ... 0xD1:
272 case M98090_REG_INTERRUPT_S:
273 case M98090_REG_RESERVED:
274 case M98090_REG_LINE_INPUT_CONFIG:
275 case M98090_REG_LINE_INPUT_LEVEL:
276 case M98090_REG_INPUT_MODE:
277 case M98090_REG_MIC1_INPUT_LEVEL:
278 case M98090_REG_MIC2_INPUT_LEVEL:
279 case M98090_REG_MIC_BIAS_VOLTAGE:
280 case M98090_REG_DIGITAL_MIC_ENABLE:
281 case M98090_REG_DIGITAL_MIC_CONFIG:
282 case M98090_REG_LEFT_ADC_MIXER:
283 case M98090_REG_RIGHT_ADC_MIXER:
284 case M98090_REG_LEFT_ADC_LEVEL:
285 case M98090_REG_RIGHT_ADC_LEVEL:
286 case M98090_REG_ADC_BIQUAD_LEVEL:
287 case M98090_REG_ADC_SIDETONE:
288 case M98090_REG_SYSTEM_CLOCK:
289 case M98090_REG_CLOCK_MODE:
290 case M98090_REG_CLOCK_RATIO_NI_MSB:
291 case M98090_REG_CLOCK_RATIO_NI_LSB:
292 case M98090_REG_CLOCK_RATIO_MI_MSB:
293 case M98090_REG_CLOCK_RATIO_MI_LSB:
294 case M98090_REG_MASTER_MODE:
295 case M98090_REG_INTERFACE_FORMAT:
296 case M98090_REG_TDM_CONTROL:
297 case M98090_REG_TDM_FORMAT:
298 case M98090_REG_IO_CONFIGURATION:
299 case M98090_REG_FILTER_CONFIG:
300 case M98090_REG_DAI_PLAYBACK_LEVEL:
301 case M98090_REG_DAI_PLAYBACK_LEVEL_EQ:
302 case M98090_REG_LEFT_HP_MIXER:
303 case M98090_REG_RIGHT_HP_MIXER:
304 case M98090_REG_HP_CONTROL:
305 case M98090_REG_LEFT_HP_VOLUME:
306 case M98090_REG_RIGHT_HP_VOLUME:
307 case M98090_REG_LEFT_SPK_MIXER:
308 case M98090_REG_RIGHT_SPK_MIXER:
309 case M98090_REG_SPK_CONTROL:
310 case M98090_REG_LEFT_SPK_VOLUME:
311 case M98090_REG_RIGHT_SPK_VOLUME:
312 case M98090_REG_DRC_TIMING:
313 case M98090_REG_DRC_COMPRESSOR:
314 case M98090_REG_DRC_EXPANDER:
315 case M98090_REG_DRC_GAIN:
316 case M98090_REG_RCV_LOUTL_MIXER:
317 case M98090_REG_RCV_LOUTL_CONTROL:
318 case M98090_REG_RCV_LOUTL_VOLUME:
319 case M98090_REG_LOUTR_MIXER:
320 case M98090_REG_LOUTR_CONTROL:
321 case M98090_REG_LOUTR_VOLUME:
322 case M98090_REG_JACK_DETECT:
323 case M98090_REG_INPUT_ENABLE:
324 case M98090_REG_OUTPUT_ENABLE:
325 case M98090_REG_LEVEL_CONTROL:
326 case M98090_REG_DSP_FILTER_ENABLE:
327 case M98090_REG_BIAS_CONTROL:
328 case M98090_REG_DAC_CONTROL:
329 case M98090_REG_ADC_CONTROL:
330 case M98090_REG_DEVICE_SHUTDOWN:
331 case M98090_REG_EQUALIZER_BASE ... M98090_REG_EQUALIZER_BASE + 0x68:
332 case M98090_REG_RECORD_BIQUAD_BASE ... M98090_REG_RECORD_BIQUAD_BASE + 0x0E:
333 case M98090_REG_DMIC3_VOLUME:
334 case M98090_REG_DMIC4_VOLUME:
335 case M98090_REG_DMIC34_BQ_PREATTEN:
336 case M98090_REG_RECORD_TDM_SLOT:
337 case M98090_REG_SAMPLE_RATE:
338 case M98090_REG_DMIC34_BIQUAD_BASE ... M98090_REG_DMIC34_BIQUAD_BASE + 0x0E:
339 case M98090_REG_REVISION_ID: 272 case M98090_REG_REVISION_ID:
340 return true; 273 return true;
341 default: 274 default:
@@ -1818,10 +1751,13 @@ static int max98090_set_bias_level(struct snd_soc_codec *codec,
1818 if (IS_ERR(max98090->mclk)) 1751 if (IS_ERR(max98090->mclk))
1819 break; 1752 break;
1820 1753
1821 if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_ON) 1754 if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_ON) {
1822 clk_disable_unprepare(max98090->mclk); 1755 clk_disable_unprepare(max98090->mclk);
1823 else 1756 } else {
1824 clk_prepare_enable(max98090->mclk); 1757 ret = clk_prepare_enable(max98090->mclk);
1758 if (ret)
1759 return ret;
1760 }
1825 break; 1761 break;
1826 1762
1827 case SND_SOC_BIAS_STANDBY: 1763 case SND_SOC_BIAS_STANDBY:
diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c
index ea45c355d324..ad4909e17327 100644
--- a/sound/soc/codecs/max98095.c
+++ b/sound/soc/codecs/max98095.c
@@ -202,300 +202,36 @@ static const struct reg_default max98095_reg_def[] = {
202 { 0xff, 0x00 }, /* FF */ 202 { 0xff, 0x00 }, /* FF */
203}; 203};
204 204
205static struct {
206 int readable;
207 int writable;
208} max98095_access[M98095_REG_CNT] = {
209 { 0x00, 0x00 }, /* 00 */
210 { 0xFF, 0x00 }, /* 01 */
211 { 0xFF, 0x00 }, /* 02 */
212 { 0xFF, 0x00 }, /* 03 */
213 { 0xFF, 0x00 }, /* 04 */
214 { 0xFF, 0x00 }, /* 05 */
215 { 0xFF, 0x00 }, /* 06 */
216 { 0xFF, 0x00 }, /* 07 */
217 { 0xFF, 0x00 }, /* 08 */
218 { 0xFF, 0x00 }, /* 09 */
219 { 0xFF, 0x00 }, /* 0A */
220 { 0xFF, 0x00 }, /* 0B */
221 { 0xFF, 0x00 }, /* 0C */
222 { 0xFF, 0x00 }, /* 0D */
223 { 0xFF, 0x00 }, /* 0E */
224 { 0xFF, 0x9F }, /* 0F */
225 { 0xFF, 0xFF }, /* 10 */
226 { 0xFF, 0xFF }, /* 11 */
227 { 0xFF, 0xFF }, /* 12 */
228 { 0xFF, 0xFF }, /* 13 */
229 { 0xFF, 0xFF }, /* 14 */
230 { 0xFF, 0xFF }, /* 15 */
231 { 0xFF, 0xFF }, /* 16 */
232 { 0xFF, 0xFF }, /* 17 */
233 { 0xFF, 0xFF }, /* 18 */
234 { 0xFF, 0xFF }, /* 19 */
235 { 0xFF, 0xFF }, /* 1A */
236 { 0xFF, 0xFF }, /* 1B */
237 { 0xFF, 0xFF }, /* 1C */
238 { 0xFF, 0xFF }, /* 1D */
239 { 0xFF, 0x77 }, /* 1E */
240 { 0xFF, 0x77 }, /* 1F */
241 { 0xFF, 0x77 }, /* 20 */
242 { 0xFF, 0x77 }, /* 21 */
243 { 0xFF, 0x77 }, /* 22 */
244 { 0xFF, 0x77 }, /* 23 */
245 { 0xFF, 0xFF }, /* 24 */
246 { 0xFF, 0x7F }, /* 25 */
247 { 0xFF, 0x31 }, /* 26 */
248 { 0xFF, 0xFF }, /* 27 */
249 { 0xFF, 0xFF }, /* 28 */
250 { 0xFF, 0xFF }, /* 29 */
251 { 0xFF, 0xF7 }, /* 2A */
252 { 0xFF, 0x2F }, /* 2B */
253 { 0xFF, 0xEF }, /* 2C */
254 { 0xFF, 0xFF }, /* 2D */
255 { 0xFF, 0xFF }, /* 2E */
256 { 0xFF, 0xFF }, /* 2F */
257 { 0xFF, 0xFF }, /* 30 */
258 { 0xFF, 0xFF }, /* 31 */
259 { 0xFF, 0xFF }, /* 32 */
260 { 0xFF, 0xFF }, /* 33 */
261 { 0xFF, 0xF7 }, /* 34 */
262 { 0xFF, 0x2F }, /* 35 */
263 { 0xFF, 0xCF }, /* 36 */
264 { 0xFF, 0xFF }, /* 37 */
265 { 0xFF, 0xFF }, /* 38 */
266 { 0xFF, 0xFF }, /* 39 */
267 { 0xFF, 0xFF }, /* 3A */
268 { 0xFF, 0xFF }, /* 3B */
269 { 0xFF, 0xFF }, /* 3C */
270 { 0xFF, 0xFF }, /* 3D */
271 { 0xFF, 0xF7 }, /* 3E */
272 { 0xFF, 0x2F }, /* 3F */
273 { 0xFF, 0xCF }, /* 40 */
274 { 0xFF, 0xFF }, /* 41 */
275 { 0xFF, 0x77 }, /* 42 */
276 { 0xFF, 0xFF }, /* 43 */
277 { 0xFF, 0xFF }, /* 44 */
278 { 0xFF, 0xFF }, /* 45 */
279 { 0xFF, 0xFF }, /* 46 */
280 { 0xFF, 0xFF }, /* 47 */
281 { 0xFF, 0xFF }, /* 48 */
282 { 0xFF, 0x0F }, /* 49 */
283 { 0xFF, 0xFF }, /* 4A */
284 { 0xFF, 0xFF }, /* 4B */
285 { 0xFF, 0x3F }, /* 4C */
286 { 0xFF, 0x3F }, /* 4D */
287 { 0xFF, 0x3F }, /* 4E */
288 { 0xFF, 0xFF }, /* 4F */
289 { 0xFF, 0x7F }, /* 50 */
290 { 0xFF, 0x7F }, /* 51 */
291 { 0xFF, 0x0F }, /* 52 */
292 { 0xFF, 0x3F }, /* 53 */
293 { 0xFF, 0x3F }, /* 54 */
294 { 0xFF, 0x3F }, /* 55 */
295 { 0xFF, 0xFF }, /* 56 */
296 { 0xFF, 0xFF }, /* 57 */
297 { 0xFF, 0xBF }, /* 58 */
298 { 0xFF, 0x1F }, /* 59 */
299 { 0xFF, 0xBF }, /* 5A */
300 { 0xFF, 0x1F }, /* 5B */
301 { 0xFF, 0xBF }, /* 5C */
302 { 0xFF, 0x3F }, /* 5D */
303 { 0xFF, 0x3F }, /* 5E */
304 { 0xFF, 0x7F }, /* 5F */
305 { 0xFF, 0x7F }, /* 60 */
306 { 0xFF, 0x47 }, /* 61 */
307 { 0xFF, 0x9F }, /* 62 */
308 { 0xFF, 0x9F }, /* 63 */
309 { 0xFF, 0x9F }, /* 64 */
310 { 0xFF, 0x9F }, /* 65 */
311 { 0xFF, 0x9F }, /* 66 */
312 { 0xFF, 0xBF }, /* 67 */
313 { 0xFF, 0xBF }, /* 68 */
314 { 0xFF, 0xFF }, /* 69 */
315 { 0xFF, 0xFF }, /* 6A */
316 { 0xFF, 0x7F }, /* 6B */
317 { 0xFF, 0xF7 }, /* 6C */
318 { 0xFF, 0xFF }, /* 6D */
319 { 0xFF, 0xFF }, /* 6E */
320 { 0xFF, 0x1F }, /* 6F */
321 { 0xFF, 0xF7 }, /* 70 */
322 { 0xFF, 0xFF }, /* 71 */
323 { 0xFF, 0xFF }, /* 72 */
324 { 0xFF, 0x1F }, /* 73 */
325 { 0xFF, 0xF7 }, /* 74 */
326 { 0xFF, 0xFF }, /* 75 */
327 { 0xFF, 0xFF }, /* 76 */
328 { 0xFF, 0x1F }, /* 77 */
329 { 0xFF, 0xF7 }, /* 78 */
330 { 0xFF, 0xFF }, /* 79 */
331 { 0xFF, 0xFF }, /* 7A */
332 { 0xFF, 0x1F }, /* 7B */
333 { 0xFF, 0xF7 }, /* 7C */
334 { 0xFF, 0xFF }, /* 7D */
335 { 0xFF, 0xFF }, /* 7E */
336 { 0xFF, 0x1F }, /* 7F */
337 { 0xFF, 0xF7 }, /* 80 */
338 { 0xFF, 0xFF }, /* 81 */
339 { 0xFF, 0xFF }, /* 82 */
340 { 0xFF, 0x1F }, /* 83 */
341 { 0xFF, 0x7F }, /* 84 */
342 { 0xFF, 0x0F }, /* 85 */
343 { 0xFF, 0xD8 }, /* 86 */
344 { 0xFF, 0xFF }, /* 87 */
345 { 0xFF, 0xEF }, /* 88 */
346 { 0xFF, 0xFE }, /* 89 */
347 { 0xFF, 0xFE }, /* 8A */
348 { 0xFF, 0xFF }, /* 8B */
349 { 0xFF, 0xFF }, /* 8C */
350 { 0xFF, 0x3F }, /* 8D */
351 { 0xFF, 0xFF }, /* 8E */
352 { 0xFF, 0x3F }, /* 8F */
353 { 0xFF, 0x8F }, /* 90 */
354 { 0xFF, 0xFF }, /* 91 */
355 { 0xFF, 0x3F }, /* 92 */
356 { 0xFF, 0xFF }, /* 93 */
357 { 0xFF, 0xFF }, /* 94 */
358 { 0xFF, 0x0F }, /* 95 */
359 { 0xFF, 0x3F }, /* 96 */
360 { 0xFF, 0x8C }, /* 97 */
361 { 0x00, 0x00 }, /* 98 */
362 { 0x00, 0x00 }, /* 99 */
363 { 0x00, 0x00 }, /* 9A */
364 { 0x00, 0x00 }, /* 9B */
365 { 0x00, 0x00 }, /* 9C */
366 { 0x00, 0x00 }, /* 9D */
367 { 0x00, 0x00 }, /* 9E */
368 { 0x00, 0x00 }, /* 9F */
369 { 0x00, 0x00 }, /* A0 */
370 { 0x00, 0x00 }, /* A1 */
371 { 0x00, 0x00 }, /* A2 */
372 { 0x00, 0x00 }, /* A3 */
373 { 0x00, 0x00 }, /* A4 */
374 { 0x00, 0x00 }, /* A5 */
375 { 0x00, 0x00 }, /* A6 */
376 { 0x00, 0x00 }, /* A7 */
377 { 0x00, 0x00 }, /* A8 */
378 { 0x00, 0x00 }, /* A9 */
379 { 0x00, 0x00 }, /* AA */
380 { 0x00, 0x00 }, /* AB */
381 { 0x00, 0x00 }, /* AC */
382 { 0x00, 0x00 }, /* AD */
383 { 0x00, 0x00 }, /* AE */
384 { 0x00, 0x00 }, /* AF */
385 { 0x00, 0x00 }, /* B0 */
386 { 0x00, 0x00 }, /* B1 */
387 { 0x00, 0x00 }, /* B2 */
388 { 0x00, 0x00 }, /* B3 */
389 { 0x00, 0x00 }, /* B4 */
390 { 0x00, 0x00 }, /* B5 */
391 { 0x00, 0x00 }, /* B6 */
392 { 0x00, 0x00 }, /* B7 */
393 { 0x00, 0x00 }, /* B8 */
394 { 0x00, 0x00 }, /* B9 */
395 { 0x00, 0x00 }, /* BA */
396 { 0x00, 0x00 }, /* BB */
397 { 0x00, 0x00 }, /* BC */
398 { 0x00, 0x00 }, /* BD */
399 { 0x00, 0x00 }, /* BE */
400 { 0x00, 0x00 }, /* BF */
401 { 0x00, 0x00 }, /* C0 */
402 { 0x00, 0x00 }, /* C1 */
403 { 0x00, 0x00 }, /* C2 */
404 { 0x00, 0x00 }, /* C3 */
405 { 0x00, 0x00 }, /* C4 */
406 { 0x00, 0x00 }, /* C5 */
407 { 0x00, 0x00 }, /* C6 */
408 { 0x00, 0x00 }, /* C7 */
409 { 0x00, 0x00 }, /* C8 */
410 { 0x00, 0x00 }, /* C9 */
411 { 0x00, 0x00 }, /* CA */
412 { 0x00, 0x00 }, /* CB */
413 { 0x00, 0x00 }, /* CC */
414 { 0x00, 0x00 }, /* CD */
415 { 0x00, 0x00 }, /* CE */
416 { 0x00, 0x00 }, /* CF */
417 { 0x00, 0x00 }, /* D0 */
418 { 0x00, 0x00 }, /* D1 */
419 { 0x00, 0x00 }, /* D2 */
420 { 0x00, 0x00 }, /* D3 */
421 { 0x00, 0x00 }, /* D4 */
422 { 0x00, 0x00 }, /* D5 */
423 { 0x00, 0x00 }, /* D6 */
424 { 0x00, 0x00 }, /* D7 */
425 { 0x00, 0x00 }, /* D8 */
426 { 0x00, 0x00 }, /* D9 */
427 { 0x00, 0x00 }, /* DA */
428 { 0x00, 0x00 }, /* DB */
429 { 0x00, 0x00 }, /* DC */
430 { 0x00, 0x00 }, /* DD */
431 { 0x00, 0x00 }, /* DE */
432 { 0x00, 0x00 }, /* DF */
433 { 0x00, 0x00 }, /* E0 */
434 { 0x00, 0x00 }, /* E1 */
435 { 0x00, 0x00 }, /* E2 */
436 { 0x00, 0x00 }, /* E3 */
437 { 0x00, 0x00 }, /* E4 */
438 { 0x00, 0x00 }, /* E5 */
439 { 0x00, 0x00 }, /* E6 */
440 { 0x00, 0x00 }, /* E7 */
441 { 0x00, 0x00 }, /* E8 */
442 { 0x00, 0x00 }, /* E9 */
443 { 0x00, 0x00 }, /* EA */
444 { 0x00, 0x00 }, /* EB */
445 { 0x00, 0x00 }, /* EC */
446 { 0x00, 0x00 }, /* ED */
447 { 0x00, 0x00 }, /* EE */
448 { 0x00, 0x00 }, /* EF */
449 { 0x00, 0x00 }, /* F0 */
450 { 0x00, 0x00 }, /* F1 */
451 { 0x00, 0x00 }, /* F2 */
452 { 0x00, 0x00 }, /* F3 */
453 { 0x00, 0x00 }, /* F4 */
454 { 0x00, 0x00 }, /* F5 */
455 { 0x00, 0x00 }, /* F6 */
456 { 0x00, 0x00 }, /* F7 */
457 { 0x00, 0x00 }, /* F8 */
458 { 0x00, 0x00 }, /* F9 */
459 { 0x00, 0x00 }, /* FA */
460 { 0x00, 0x00 }, /* FB */
461 { 0x00, 0x00 }, /* FC */
462 { 0x00, 0x00 }, /* FD */
463 { 0x00, 0x00 }, /* FE */
464 { 0xFF, 0x00 }, /* FF */
465};
466
467static bool max98095_readable(struct device *dev, unsigned int reg) 205static bool max98095_readable(struct device *dev, unsigned int reg)
468{ 206{
469 if (reg >= M98095_REG_CNT) 207 switch (reg) {
470 return 0; 208 case M98095_001_HOST_INT_STS ... M98095_097_PWR_SYS:
471 return max98095_access[reg].readable != 0; 209 case M98095_0FF_REV_ID:
210 return true;
211 default:
212 return false;
213 }
472} 214}
473 215
474static bool max98095_volatile(struct device *dev, unsigned int reg) 216static bool max98095_writeable(struct device *dev, unsigned int reg)
475{ 217{
476 if (reg > M98095_REG_MAX_CACHED)
477 return 1;
478
479 switch (reg) { 218 switch (reg) {
480 case M98095_000_HOST_DATA: 219 case M98095_00F_HOST_CFG ... M98095_097_PWR_SYS:
481 case M98095_001_HOST_INT_STS: 220 return true;
482 case M98095_002_HOST_RSP_STS: 221 default:
483 case M98095_003_HOST_CMD_STS: 222 return false;
484 case M98095_004_CODEC_STS:
485 case M98095_005_DAI1_ALC_STS:
486 case M98095_006_DAI2_ALC_STS:
487 case M98095_007_JACK_AUTO_STS:
488 case M98095_008_JACK_MANUAL_STS:
489 case M98095_009_JACK_VBAT_STS:
490 case M98095_00A_ACC_ADC_STS:
491 case M98095_00B_MIC_NG_AGC_STS:
492 case M98095_00C_SPK_L_VOLT_STS:
493 case M98095_00D_SPK_R_VOLT_STS:
494 case M98095_00E_TEMP_SENSOR_STS:
495 return 1;
496 } 223 }
224}
497 225
498 return 0; 226static bool max98095_volatile(struct device *dev, unsigned int reg)
227{
228 switch (reg) {
229 case M98095_000_HOST_DATA ... M98095_00E_TEMP_SENSOR_STS:
230 case M98095_REG_MAX_CACHED + 1 ... M98095_0FF_REV_ID:
231 return true;
232 default:
233 return false;
234 }
499} 235}
500 236
501static const struct regmap_config max98095_regmap = { 237static const struct regmap_config max98095_regmap = {
@@ -508,6 +244,7 @@ static const struct regmap_config max98095_regmap = {
508 .cache_type = REGCACHE_RBTREE, 244 .cache_type = REGCACHE_RBTREE,
509 245
510 .readable_reg = max98095_readable, 246 .readable_reg = max98095_readable,
247 .writeable_reg = max98095_writeable,
511 .volatile_reg = max98095_volatile, 248 .volatile_reg = max98095_volatile,
512}; 249};
513 250
@@ -1653,10 +1390,13 @@ static int max98095_set_bias_level(struct snd_soc_codec *codec,
1653 if (IS_ERR(max98095->mclk)) 1390 if (IS_ERR(max98095->mclk))
1654 break; 1391 break;
1655 1392
1656 if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_ON) 1393 if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_ON) {
1657 clk_disable_unprepare(max98095->mclk); 1394 clk_disable_unprepare(max98095->mclk);
1658 else 1395 } else {
1659 clk_prepare_enable(max98095->mclk); 1396 ret = clk_prepare_enable(max98095->mclk);
1397 if (ret)
1398 return ret;
1399 }
1660 break; 1400 break;
1661 1401
1662 case SND_SOC_BIAS_STANDBY: 1402 case SND_SOC_BIAS_STANDBY:
diff --git a/sound/soc/codecs/max98357a.c b/sound/soc/codecs/max98357a.c
index c4a211d3646c..f5e3dce2633a 100644
--- a/sound/soc/codecs/max98357a.c
+++ b/sound/soc/codecs/max98357a.c
@@ -31,6 +31,9 @@ static int max98357a_daiops_trigger(struct snd_pcm_substream *substream,
31{ 31{
32 struct gpio_desc *sdmode = snd_soc_dai_get_drvdata(dai); 32 struct gpio_desc *sdmode = snd_soc_dai_get_drvdata(dai);
33 33
34 if (!sdmode)
35 return 0;
36
34 switch (cmd) { 37 switch (cmd) {
35 case SNDRV_PCM_TRIGGER_START: 38 case SNDRV_PCM_TRIGGER_START:
36 case SNDRV_PCM_TRIGGER_RESUME: 39 case SNDRV_PCM_TRIGGER_RESUME:
@@ -48,24 +51,21 @@ static int max98357a_daiops_trigger(struct snd_pcm_substream *substream,
48} 51}
49 52
50static const struct snd_soc_dapm_widget max98357a_dapm_widgets[] = { 53static const struct snd_soc_dapm_widget max98357a_dapm_widgets[] = {
51 SND_SOC_DAPM_DAC("SDMode", NULL, SND_SOC_NOPM, 0, 0),
52 SND_SOC_DAPM_OUTPUT("Speaker"), 54 SND_SOC_DAPM_OUTPUT("Speaker"),
53}; 55};
54 56
55static const struct snd_soc_dapm_route max98357a_dapm_routes[] = { 57static const struct snd_soc_dapm_route max98357a_dapm_routes[] = {
56 {"Speaker", NULL, "SDMode"}, 58 {"Speaker", NULL, "HiFi Playback"},
57}; 59};
58 60
59static int max98357a_codec_probe(struct snd_soc_codec *codec) 61static int max98357a_codec_probe(struct snd_soc_codec *codec)
60{ 62{
61 struct gpio_desc *sdmode; 63 struct gpio_desc *sdmode;
62 64
63 sdmode = devm_gpiod_get(codec->dev, "sdmode", GPIOD_OUT_LOW); 65 sdmode = devm_gpiod_get_optional(codec->dev, "sdmode", GPIOD_OUT_LOW);
64 if (IS_ERR(sdmode)) { 66 if (IS_ERR(sdmode))
65 dev_err(codec->dev, "%s() unable to get sdmode GPIO: %ld\n",
66 __func__, PTR_ERR(sdmode));
67 return PTR_ERR(sdmode); 67 return PTR_ERR(sdmode);
68 } 68
69 snd_soc_codec_set_drvdata(codec, sdmode); 69 snd_soc_codec_set_drvdata(codec, sdmode);
70 70
71 return 0; 71 return 0;
@@ -104,15 +104,8 @@ static struct snd_soc_dai_driver max98357a_dai_driver = {
104 104
105static int max98357a_platform_probe(struct platform_device *pdev) 105static int max98357a_platform_probe(struct platform_device *pdev)
106{ 106{
107 int ret; 107 return snd_soc_register_codec(&pdev->dev, &max98357a_codec_driver,
108
109 ret = snd_soc_register_codec(&pdev->dev, &max98357a_codec_driver,
110 &max98357a_dai_driver, 1); 108 &max98357a_dai_driver, 1);
111 if (ret)
112 dev_err(&pdev->dev, "%s() error registering codec driver: %d\n",
113 __func__, ret);
114
115 return ret;
116} 109}
117 110
118static int max98357a_platform_remove(struct platform_device *pdev) 111static int max98357a_platform_remove(struct platform_device *pdev)
diff --git a/sound/soc/codecs/max9877.c b/sound/soc/codecs/max9877.c
index 7692623ad5c3..fb448dde018d 100644
--- a/sound/soc/codecs/max9877.c
+++ b/sound/soc/codecs/max9877.c
@@ -20,9 +20,7 @@
20 20
21#include "max9877.h" 21#include "max9877.h"
22 22
23static struct regmap *regmap; 23static const struct reg_default max9877_regs[] = {
24
25static struct reg_default max9877_regs[] = {
26 { 0, 0x40 }, 24 { 0, 0x40 },
27 { 1, 0x00 }, 25 { 1, 0x00 },
28 { 2, 0x00 }, 26 { 2, 0x00 },
@@ -123,7 +121,7 @@ static const struct snd_soc_dapm_route max9877_dapm_routes[] = {
123 { "HPR", NULL, "SHDN" }, 121 { "HPR", NULL, "SHDN" },
124}; 122};
125 123
126static const struct snd_soc_codec_driver max9877_codec = { 124static const struct snd_soc_component_driver max9877_component_driver = {
127 .controls = max9877_controls, 125 .controls = max9877_controls,
128 .num_controls = ARRAY_SIZE(max9877_controls), 126 .num_controls = ARRAY_SIZE(max9877_controls),
129 127
@@ -145,6 +143,7 @@ static const struct regmap_config max9877_regmap = {
145static int max9877_i2c_probe(struct i2c_client *client, 143static int max9877_i2c_probe(struct i2c_client *client,
146 const struct i2c_device_id *id) 144 const struct i2c_device_id *id)
147{ 145{
146 struct regmap *regmap;
148 int i; 147 int i;
149 148
150 regmap = devm_regmap_init_i2c(client, &max9877_regmap); 149 regmap = devm_regmap_init_i2c(client, &max9877_regmap);
@@ -155,14 +154,8 @@ static int max9877_i2c_probe(struct i2c_client *client,
155 for (i = 0; i < ARRAY_SIZE(max9877_regs); i++) 154 for (i = 0; i < ARRAY_SIZE(max9877_regs); i++)
156 regmap_write(regmap, max9877_regs[i].reg, max9877_regs[i].def); 155 regmap_write(regmap, max9877_regs[i].reg, max9877_regs[i].def);
157 156
158 return snd_soc_register_codec(&client->dev, &max9877_codec, NULL, 0); 157 return devm_snd_soc_register_component(&client->dev,
159} 158 &max9877_component_driver, NULL, 0);
160
161static int max9877_i2c_remove(struct i2c_client *client)
162{
163 snd_soc_unregister_codec(&client->dev);
164
165 return 0;
166} 159}
167 160
168static const struct i2c_device_id max9877_i2c_id[] = { 161static const struct i2c_device_id max9877_i2c_id[] = {
@@ -176,7 +169,6 @@ static struct i2c_driver max9877_i2c_driver = {
176 .name = "max9877", 169 .name = "max9877",
177 }, 170 },
178 .probe = max9877_i2c_probe, 171 .probe = max9877_i2c_probe,
179 .remove = max9877_i2c_remove,
180 .id_table = max9877_i2c_id, 172 .id_table = max9877_i2c_id,
181}; 173};
182 174
diff --git a/sound/soc/codecs/max98925.c b/sound/soc/codecs/max98925.c
index ce551eecbf95..ebb648aea8c6 100644
--- a/sound/soc/codecs/max98925.c
+++ b/sound/soc/codecs/max98925.c
@@ -271,8 +271,6 @@ static inline int max98925_rate_value(struct snd_soc_codec *codec,
271 break; 271 break;
272 } 272 }
273 } 273 }
274 dev_dbg(codec->dev, "%s: sample rate is %d, returning %d\n",
275 __func__, rate_table[i].rate, *value);
276 return ret; 274 return ret;
277} 275}
278 276
@@ -523,7 +521,6 @@ static int max98925_probe(struct snd_soc_codec *codec)
523 struct max98925_priv *max98925 = snd_soc_codec_get_drvdata(codec); 521 struct max98925_priv *max98925 = snd_soc_codec_get_drvdata(codec);
524 522
525 max98925->codec = codec; 523 max98925->codec = codec;
526 codec->control_data = max98925->regmap;
527 regmap_write(max98925->regmap, MAX98925_GLOBAL_ENABLE, 0x00); 524 regmap_write(max98925->regmap, MAX98925_GLOBAL_ENABLE, 0x00);
528 /* It's not the default but we need to set DAI_DLY */ 525 /* It's not the default but we need to set DAI_DLY */
529 regmap_write(max98925->regmap, 526 regmap_write(max98925->regmap,
diff --git a/sound/soc/codecs/ml26124.c b/sound/soc/codecs/ml26124.c
index bda2bd751be4..f561c78b9e0e 100644
--- a/sound/soc/codecs/ml26124.c
+++ b/sound/soc/codecs/ml26124.c
@@ -199,7 +199,7 @@ static const struct clk_coeff coeff_div[] = {
199 {12288000, 48000, 0xc, 0x0, 0x30, 0x0, 0x4}, 199 {12288000, 48000, 0xc, 0x0, 0x30, 0x0, 0x4},
200}; 200};
201 201
202static struct reg_default ml26124_reg[] = { 202static const struct reg_default ml26124_reg[] = {
203 /* CLOCK control Register */ 203 /* CLOCK control Register */
204 {0x00, 0x00 }, /* Sampling Rate */ 204 {0x00, 0x00 }, /* Sampling Rate */
205 {0x02, 0x00}, /* PLL NL */ 205 {0x02, 0x00}, /* PLL NL */
diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c
index 83029e461309..4a658aba7372 100644
--- a/sound/soc/codecs/rt286.c
+++ b/sound/soc/codecs/rt286.c
@@ -38,7 +38,7 @@
38#define RT288_VENDOR_ID 0x10ec0288 38#define RT288_VENDOR_ID 0x10ec0288
39 39
40struct rt286_priv { 40struct rt286_priv {
41 struct reg_default *index_cache; 41 const struct reg_default *index_cache;
42 int index_cache_size; 42 int index_cache_size;
43 struct regmap *regmap; 43 struct regmap *regmap;
44 struct snd_soc_codec *codec; 44 struct snd_soc_codec *codec;
@@ -50,7 +50,7 @@ struct rt286_priv {
50 int clk_id; 50 int clk_id;
51}; 51};
52 52
53static struct reg_default rt286_index_def[] = { 53static const struct reg_default rt286_index_def[] = {
54 { 0x01, 0xaaaa }, 54 { 0x01, 0xaaaa },
55 { 0x02, 0x8aaa }, 55 { 0x02, 0x8aaa },
56 { 0x03, 0x0002 }, 56 { 0x03, 0x0002 },
diff --git a/sound/soc/codecs/rt5651.c b/sound/soc/codecs/rt5651.c
index 872121015dfc..54acd286bd00 100644
--- a/sound/soc/codecs/rt5651.c
+++ b/sound/soc/codecs/rt5651.c
@@ -46,7 +46,7 @@ static const struct regmap_range_cfg rt5651_ranges[] = {
46 .window_len = 0x1, }, 46 .window_len = 0x1, },
47}; 47};
48 48
49static struct reg_default init_list[] = { 49static const struct reg_default init_list[] = {
50 {RT5651_PR_BASE + 0x3d, 0x3e00}, 50 {RT5651_PR_BASE + 0x3d, 0x3e00},
51}; 51};
52 52
diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c
index 5e0a8a57fc48..2f6a65afe5d2 100644
--- a/sound/soc/codecs/tas2552.c
+++ b/sound/soc/codecs/tas2552.c
@@ -38,7 +38,7 @@
38 38
39#include "tas2552.h" 39#include "tas2552.h"
40 40
41static struct reg_default tas2552_reg_defs[] = { 41static const struct reg_default tas2552_reg_defs[] = {
42 {TAS2552_CFG_1, 0x22}, 42 {TAS2552_CFG_1, 0x22},
43 {TAS2552_CFG_3, 0x80}, 43 {TAS2552_CFG_3, 0x80},
44 {TAS2552_DOUT, 0x00}, 44 {TAS2552_DOUT, 0x00},
diff --git a/sound/soc/codecs/tfa9879.c b/sound/soc/codecs/tfa9879.c
index 86d05f01e5f9..cb5310d89c0f 100644
--- a/sound/soc/codecs/tfa9879.c
+++ b/sound/soc/codecs/tfa9879.c
@@ -160,7 +160,7 @@ static int tfa9879_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
160 return 0; 160 return 0;
161} 161}
162 162
163static struct reg_default tfa9879_regs[] = { 163static const struct reg_default tfa9879_regs[] = {
164 { TFA9879_DEVICE_CONTROL, 0x0000 }, /* 0x00 */ 164 { TFA9879_DEVICE_CONTROL, 0x0000 }, /* 0x00 */
165 { TFA9879_SERIAL_INTERFACE_1, 0x0a18 }, /* 0x01 */ 165 { TFA9879_SERIAL_INTERFACE_1, 0x0a18 }, /* 0x01 */
166 { TFA9879_PCM_IOM2_FORMAT_1, 0x0007 }, /* 0x02 */ 166 { TFA9879_PCM_IOM2_FORMAT_1, 0x0007 }, /* 0x02 */
diff --git a/sound/soc/codecs/wm2200.c b/sound/soc/codecs/wm2200.c
index d4fa224d68b1..cdaa175283df 100644
--- a/sound/soc/codecs/wm2200.c
+++ b/sound/soc/codecs/wm2200.c
@@ -166,7 +166,7 @@ static const struct wm_adsp_region wm2200_dsp2_regions[] = {
166 { .type = WMFW_ADSP1_ZM, .base = WM2200_DSP2_ZM_BASE }, 166 { .type = WMFW_ADSP1_ZM, .base = WM2200_DSP2_ZM_BASE },
167}; 167};
168 168
169static struct reg_default wm2200_reg_defaults[] = { 169static const struct reg_default wm2200_reg_defaults[] = {
170 { 0x000B, 0x0000 }, /* R11 - Tone Generator 1 */ 170 { 0x000B, 0x0000 }, /* R11 - Tone Generator 1 */
171 { 0x0102, 0x0000 }, /* R258 - Clocking 3 */ 171 { 0x0102, 0x0000 }, /* R258 - Clocking 3 */
172 { 0x0103, 0x0011 }, /* R259 - Clocking 4 */ 172 { 0x0103, 0x0011 }, /* R259 - Clocking 4 */
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 40c4617e3ef1..c67e3047f022 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -113,7 +113,7 @@ WM8962_REGULATOR_EVENT(5)
113WM8962_REGULATOR_EVENT(6) 113WM8962_REGULATOR_EVENT(6)
114WM8962_REGULATOR_EVENT(7) 114WM8962_REGULATOR_EVENT(7)
115 115
116static struct reg_default wm8962_reg[] = { 116static const struct reg_default wm8962_reg[] = {
117 { 0, 0x009F }, /* R0 - Left Input volume */ 117 { 0, 0x009F }, /* R0 - Left Input volume */
118 { 1, 0x049F }, /* R1 - Right Input volume */ 118 { 1, 0x049F }, /* R1 - Right Input volume */
119 { 2, 0x0000 }, /* R2 - HPOUTL volume */ 119 { 2, 0x0000 }, /* R2 - HPOUTL volume */
diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c
index 3f4dfb95d2d7..9638accb74b9 100644
--- a/sound/soc/codecs/wm8993.c
+++ b/sound/soc/codecs/wm8993.c
@@ -41,7 +41,7 @@ static const char *wm8993_supply_names[WM8993_NUM_SUPPLIES] = {
41 "SPKVDD", 41 "SPKVDD",
42}; 42};
43 43
44static struct reg_default wm8993_reg_defaults[] = { 44static const struct reg_default wm8993_reg_defaults[] = {
45 { 1, 0x0000 }, /* R1 - Power Management (1) */ 45 { 1, 0x0000 }, /* R1 - Power Management (1) */
46 { 2, 0x6000 }, /* R2 - Power Management (2) */ 46 { 2, 0x6000 }, /* R2 - Power Management (2) */
47 { 3, 0x0000 }, /* R3 - Power Management (3) */ 47 { 3, 0x0000 }, /* R3 - Power Management (3) */
@@ -1595,7 +1595,7 @@ static int wm8993_resume(struct snd_soc_codec *codec)
1595#endif 1595#endif
1596 1596
1597/* Tune DC servo configuration */ 1597/* Tune DC servo configuration */
1598static struct reg_default wm8993_regmap_patch[] = { 1598static const struct reg_default wm8993_regmap_patch[] = {
1599 { 0x44, 3 }, 1599 { 0x44, 3 },
1600 { 0x56, 3 }, 1600 { 0x56, 3 },
1601 { 0x44, 0 }, 1601 { 0x44, 0 },
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c
index 29b6688fb6ee..66c09556da79 100644
--- a/sound/soc/codecs/wm8996.c
+++ b/sound/soc/codecs/wm8996.c
@@ -117,7 +117,7 @@ WM8996_REGULATOR_EVENT(0)
117WM8996_REGULATOR_EVENT(1) 117WM8996_REGULATOR_EVENT(1)
118WM8996_REGULATOR_EVENT(2) 118WM8996_REGULATOR_EVENT(2)
119 119
120static struct reg_default wm8996_reg[] = { 120static const struct reg_default wm8996_reg[] = {
121 { WM8996_POWER_MANAGEMENT_1, 0x0 }, 121 { WM8996_POWER_MANAGEMENT_1, 0x0 },
122 { WM8996_POWER_MANAGEMENT_2, 0x0 }, 122 { WM8996_POWER_MANAGEMENT_2, 0x0 },
123 { WM8996_POWER_MANAGEMENT_3, 0x0 }, 123 { WM8996_POWER_MANAGEMENT_3, 0x0 },
diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c
index 011516eec4b5..45223a20331f 100644
--- a/sound/soc/codecs/wm9081.c
+++ b/sound/soc/codecs/wm9081.c
@@ -30,7 +30,7 @@
30#include <sound/wm9081.h> 30#include <sound/wm9081.h>
31#include "wm9081.h" 31#include "wm9081.h"
32 32
33static struct reg_default wm9081_reg[] = { 33static const struct reg_default wm9081_reg[] = {
34 { 2, 0x00B9 }, /* R2 - Analogue Lineout */ 34 { 2, 0x00B9 }, /* R2 - Analogue Lineout */
35 { 3, 0x00B9 }, /* R3 - Analogue Speaker PGA */ 35 { 3, 0x00B9 }, /* R3 - Analogue Speaker PGA */
36 { 4, 0x0001 }, /* R4 - VMID Control */ 36 { 4, 0x0001 }, /* R4 - VMID Control */