Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: 88pm60x: Don't use control data for i2c

In preparation for using the regmap directly in the CODEC driver replace
references to the I2C client using control_data with references to the
driver private data.

Signed-off-by: Mark Brown <broonie@linaro.org>

+9 -8
+9 -8
sound/soc/codecs/88pm860x-codec.c
··· 1166 1166 static int pm860x_set_bias_level(struct snd_soc_codec *codec, 1167 1167 enum snd_soc_bias_level level) 1168 1168 { 1169 + struct pm860x_priv *pm860x = snd_soc_codec_get_drvdata(codec); 1169 1170 int data; 1170 1171 1171 1172 switch (level) { ··· 1180 1179 if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) { 1181 1180 /* Enable Audio PLL & Audio section */ 1182 1181 data = AUDIO_PLL | AUDIO_SECTION_ON; 1183 - pm860x_reg_write(codec->control_data, REG_MISC2, data); 1182 + pm860x_reg_write(pm860x->i2c, REG_MISC2, data); 1184 1183 udelay(300); 1185 1184 data = AUDIO_PLL | AUDIO_SECTION_RESET 1186 1185 | AUDIO_SECTION_ON; 1187 - pm860x_reg_write(codec->control_data, REG_MISC2, data); 1186 + pm860x_reg_write(pm860x->i2c, REG_MISC2, data); 1188 1187 } 1189 1188 break; 1190 1189 1191 1190 case SND_SOC_BIAS_OFF: 1192 1191 data = AUDIO_PLL | AUDIO_SECTION_RESET | AUDIO_SECTION_ON; 1193 - pm860x_set_bits(codec->control_data, REG_MISC2, data, 0); 1192 + pm860x_set_bits(pm860x->i2c, REG_MISC2, data, 0); 1194 1193 break; 1195 1194 } 1196 1195 codec->dapm.bias_level = level; ··· 1320 1319 pm860x->det.lo_shrt = lo_shrt; 1321 1320 1322 1321 if (det & SND_JACK_HEADPHONE) 1323 - pm860x_set_bits(codec->control_data, REG_HS_DET, 1322 + pm860x_set_bits(pm860x->i2c, REG_HS_DET, 1324 1323 EN_HS_DET, EN_HS_DET); 1325 1324 /* headset short detect */ 1326 1325 if (hs_shrt) { 1327 1326 data = CLR_SHORT_HS2 | CLR_SHORT_HS1; 1328 - pm860x_set_bits(codec->control_data, REG_SHORTS, data, data); 1327 + pm860x_set_bits(pm860x->i2c, REG_SHORTS, data, data); 1329 1328 } 1330 1329 /* Lineout short detect */ 1331 1330 if (lo_shrt) { 1332 1331 data = CLR_SHORT_LO2 | CLR_SHORT_LO1; 1333 - pm860x_set_bits(codec->control_data, REG_SHORTS, data, data); 1332 + pm860x_set_bits(pm860x->i2c, REG_SHORTS, data, data); 1334 1333 } 1335 1334 1336 1335 /* sync status */ ··· 1348 1347 pm860x->det.mic_det = det; 1349 1348 1350 1349 if (det & SND_JACK_MICROPHONE) 1351 - pm860x_set_bits(codec->control_data, REG_MIC_DET, 1350 + pm860x_set_bits(pm860x->i2c, REG_MIC_DET, 1352 1351 MICDET_MASK, MICDET_MASK); 1353 1352 1354 1353 /* sync status */ ··· 1378 1377 1379 1378 pm860x_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 1380 1379 1381 - ret = pm860x_bulk_read(codec->control_data, REG_CACHE_BASE, 1380 + ret = pm860x_bulk_read(pm860x->i2c, REG_CACHE_BASE, 1382 1381 REG_CACHE_SIZE, codec->reg_cache); 1383 1382 if (ret < 0) { 1384 1383 dev_err(codec->dev, "Failed to fill register cache: %d\n",