diff options
author | Daniel Mack <zonque@gmail.com> | 2013-06-27 16:00:04 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-06-30 07:41:53 -0400 |
commit | ee441140e7676766b0ce8b9e9a259066bb54c149 (patch) | |
tree | e0d940ba2b82bfbd1095627091cbec9dc09625d0 /sound | |
parent | 97d0a868450d08fae0db3f53459852901c6e2f4f (diff) |
ASoC: adau1701: more direct regmap usage
Replace calls to snd_soc_update_bits() with regmap_update_bits().
Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/adau1701.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c index 0e250f118c0e..4cd4dd10fa24 100644 --- a/sound/soc/codecs/adau1701.c +++ b/sound/soc/codecs/adau1701.c | |||
@@ -334,7 +334,7 @@ static int adau1701_set_capture_pcm_format(struct snd_soc_codec *codec, | |||
334 | mask |= ADAU1701_SEROCTL_MSB_DEALY_MASK; | 334 | mask |= ADAU1701_SEROCTL_MSB_DEALY_MASK; |
335 | } | 335 | } |
336 | 336 | ||
337 | snd_soc_update_bits(codec, ADAU1701_SEROCTL, mask, val); | 337 | regmap_update_bits(adau1701->regmap, ADAU1701_SEROCTL, mask, val); |
338 | 338 | ||
339 | return 0; | 339 | return 0; |
340 | } | 340 | } |
@@ -362,7 +362,7 @@ static int adau1701_set_playback_pcm_format(struct snd_soc_codec *codec, | |||
362 | return -EINVAL; | 362 | return -EINVAL; |
363 | } | 363 | } |
364 | 364 | ||
365 | snd_soc_update_bits(codec, ADAU1701_SERICTL, | 365 | regmap_update_bits(adau1701->regmap, ADAU1701_SERICTL, |
366 | ADAU1701_SERICTL_MODE_MASK, val); | 366 | ADAU1701_SERICTL_MODE_MASK, val); |
367 | 367 | ||
368 | return 0; | 368 | return 0; |
@@ -403,7 +403,7 @@ static int adau1701_hw_params(struct snd_pcm_substream *substream, | |||
403 | return -EINVAL; | 403 | return -EINVAL; |
404 | } | 404 | } |
405 | 405 | ||
406 | snd_soc_update_bits(codec, ADAU1701_DSPCTRL, | 406 | regmap_update_bits(adau1701->regmap, ADAU1701_DSPCTRL, |
407 | ADAU1701_DSPCTRL_SR_MASK, val); | 407 | ADAU1701_DSPCTRL_SR_MASK, val); |
408 | 408 | ||
409 | format = params_format(params); | 409 | format = params_format(params); |
@@ -490,6 +490,7 @@ static int adau1701_set_bias_level(struct snd_soc_codec *codec, | |||
490 | enum snd_soc_bias_level level) | 490 | enum snd_soc_bias_level level) |
491 | { | 491 | { |
492 | unsigned int mask = ADAU1701_AUXNPOW_VBPD | ADAU1701_AUXNPOW_VRPD; | 492 | unsigned int mask = ADAU1701_AUXNPOW_VBPD | ADAU1701_AUXNPOW_VRPD; |
493 | struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec); | ||
493 | 494 | ||
494 | switch (level) { | 495 | switch (level) { |
495 | case SND_SOC_BIAS_ON: | 496 | case SND_SOC_BIAS_ON: |
@@ -498,11 +499,13 @@ static int adau1701_set_bias_level(struct snd_soc_codec *codec, | |||
498 | break; | 499 | break; |
499 | case SND_SOC_BIAS_STANDBY: | 500 | case SND_SOC_BIAS_STANDBY: |
500 | /* Enable VREF and VREF buffer */ | 501 | /* Enable VREF and VREF buffer */ |
501 | snd_soc_update_bits(codec, ADAU1701_AUXNPOW, mask, 0x00); | 502 | regmap_update_bits(adau1701->regmap, |
503 | ADAU1701_AUXNPOW, mask, 0x00); | ||
502 | break; | 504 | break; |
503 | case SND_SOC_BIAS_OFF: | 505 | case SND_SOC_BIAS_OFF: |
504 | /* Disable VREF and VREF buffer */ | 506 | /* Disable VREF and VREF buffer */ |
505 | snd_soc_update_bits(codec, ADAU1701_AUXNPOW, mask, mask); | 507 | regmap_update_bits(adau1701->regmap, |
508 | ADAU1701_AUXNPOW, mask, mask); | ||
506 | break; | 509 | break; |
507 | } | 510 | } |
508 | 511 | ||
@@ -514,6 +517,7 @@ static int adau1701_digital_mute(struct snd_soc_dai *dai, int mute) | |||
514 | { | 517 | { |
515 | struct snd_soc_codec *codec = dai->codec; | 518 | struct snd_soc_codec *codec = dai->codec; |
516 | unsigned int mask = ADAU1701_DSPCTRL_DAM; | 519 | unsigned int mask = ADAU1701_DSPCTRL_DAM; |
520 | struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec); | ||
517 | unsigned int val; | 521 | unsigned int val; |
518 | 522 | ||
519 | if (mute) | 523 | if (mute) |
@@ -521,7 +525,7 @@ static int adau1701_digital_mute(struct snd_soc_dai *dai, int mute) | |||
521 | else | 525 | else |
522 | val = mask; | 526 | val = mask; |
523 | 527 | ||
524 | snd_soc_update_bits(codec, ADAU1701_DSPCTRL, mask, val); | 528 | regmap_update_bits(adau1701->regmap, ADAU1701_DSPCTRL, mask, val); |
525 | 529 | ||
526 | return 0; | 530 | return 0; |
527 | } | 531 | } |
@@ -543,7 +547,8 @@ static int adau1701_set_sysclk(struct snd_soc_codec *codec, int clk_id, | |||
543 | return -EINVAL; | 547 | return -EINVAL; |
544 | } | 548 | } |
545 | 549 | ||
546 | snd_soc_update_bits(codec, ADAU1701_OSCIPOW, ADAU1701_OSCIPOW_OPD, val); | 550 | regmap_update_bits(adau1701->regmap, ADAU1701_OSCIPOW, |
551 | ADAU1701_OSCIPOW_OPD, val); | ||
547 | adau1701->sysclk = freq; | 552 | adau1701->sysclk = freq; |
548 | 553 | ||
549 | return 0; | 554 | return 0; |