All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: adau1701: more direct regmap usage
@ 2013-06-27 20:00 Daniel Mack
  2013-06-27 20:00 ` [PATCH 2/2] ASoC: adau1701: remove control_data assignment Daniel Mack
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Daniel Mack @ 2013-06-27 20:00 UTC (permalink / raw)
  To: alsa-devel; +Cc: broonie, lars, Daniel Mack

Replace calls to snd_soc_update_bits() with regmap_update_bits().

Signed-off-by: Daniel Mack <zonque@gmail.com>
---
 sound/soc/codecs/adau1701.c | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c
index ac8b2c4..ce56065 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,
 		mask |= ADAU1701_SEROCTL_MSB_DEALY_MASK;
 	}
 
-	snd_soc_update_bits(codec, ADAU1701_SEROCTL, mask, val);
+	regmap_update_bits(adau1701->regmap, ADAU1701_SEROCTL, mask, val);
 
 	return 0;
 }
@@ -362,7 +362,7 @@ static int adau1701_set_playback_pcm_format(struct snd_soc_codec *codec,
 		return -EINVAL;
 	}
 
-	snd_soc_update_bits(codec, ADAU1701_SERICTL,
+	regmap_update_bits(adau1701->regmap, ADAU1701_SERICTL,
 		ADAU1701_SERICTL_MODE_MASK, val);
 
 	return 0;
@@ -403,7 +403,7 @@ static int adau1701_hw_params(struct snd_pcm_substream *substream,
 		return -EINVAL;
 	}
 
-	snd_soc_update_bits(codec, ADAU1701_DSPCTRL,
+	regmap_update_bits(adau1701->regmap, ADAU1701_DSPCTRL,
 		ADAU1701_DSPCTRL_SR_MASK, val);
 
 	format = params_format(params);
@@ -489,6 +489,7 @@ static int adau1701_set_bias_level(struct snd_soc_codec *codec,
 		enum snd_soc_bias_level level)
 {
 	unsigned int mask = ADAU1701_AUXNPOW_VBPD | ADAU1701_AUXNPOW_VRPD;
+	struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec);
 
 	switch (level) {
 	case SND_SOC_BIAS_ON:
@@ -497,11 +498,13 @@ static int adau1701_set_bias_level(struct snd_soc_codec *codec,
 		break;
 	case SND_SOC_BIAS_STANDBY:
 		/* Enable VREF and VREF buffer */
-		snd_soc_update_bits(codec, ADAU1701_AUXNPOW, mask, 0x00);
+		regmap_update_bits(adau1701->regmap,
+				   ADAU1701_AUXNPOW, mask, 0x00);
 		break;
 	case SND_SOC_BIAS_OFF:
 		/* Disable VREF and VREF buffer */
-		snd_soc_update_bits(codec, ADAU1701_AUXNPOW, mask, mask);
+		regmap_update_bits(adau1701->regmap,
+				   ADAU1701_AUXNPOW, mask, mask);
 		break;
 	}
 
@@ -513,6 +516,7 @@ static int adau1701_digital_mute(struct snd_soc_dai *dai, int mute)
 {
 	struct snd_soc_codec *codec = dai->codec;
 	unsigned int mask = ADAU1701_DSPCTRL_DAM;
+	struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec);
 	unsigned int val;
 
 	if (mute)
@@ -520,7 +524,7 @@ static int adau1701_digital_mute(struct snd_soc_dai *dai, int mute)
 	else
 		val = mask;
 
-	snd_soc_update_bits(codec, ADAU1701_DSPCTRL, mask, val);
+	regmap_update_bits(adau1701->regmap, ADAU1701_DSPCTRL, mask, val);
 
 	return 0;
 }
@@ -542,7 +546,8 @@ static int adau1701_set_sysclk(struct snd_soc_codec *codec, int clk_id,
 		return -EINVAL;
 	}
 
-	snd_soc_update_bits(codec, ADAU1701_OSCIPOW, ADAU1701_OSCIPOW_OPD, val);
+	regmap_update_bits(adau1701->regmap, ADAU1701_OSCIPOW,
+			   ADAU1701_OSCIPOW_OPD, val);
 	adau1701->sysclk = freq;
 
 	return 0;
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] ASoC: adau1701: remove control_data assignment
  2013-06-27 20:00 [PATCH 1/2] ASoC: adau1701: more direct regmap usage Daniel Mack
@ 2013-06-27 20:00 ` Daniel Mack
  2013-06-29 12:09   ` Lars-Peter Clausen
  2013-06-29 12:09 ` [PATCH 1/2] ASoC: adau1701: more direct regmap usage Lars-Peter Clausen
  2013-06-30 11:42 ` Mark Brown
  2 siblings, 1 reply; 5+ messages in thread
From: Daniel Mack @ 2013-06-27 20:00 UTC (permalink / raw)
  To: alsa-devel; +Cc: broonie, lars, Daniel Mack

codec->control_data has to be left unset to make the ASoC core access
the regmap properly.

That bug slipped in during a rebase session of the driver refactoring.

Signed-off-by: Daniel Mack <zonque@gmail.com>
---
 sound/soc/codecs/adau1701.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c
index ce56065..16e5555 100644
--- a/sound/soc/codecs/adau1701.c
+++ b/sound/soc/codecs/adau1701.c
@@ -599,8 +599,6 @@ static int adau1701_probe(struct snd_soc_codec *codec)
 	unsigned int val;
 	struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec);
 
-	codec->control_data = to_i2c_client(codec->dev);
-
 	/*
 	 * Let the pll_clkdiv variable default to something that won't happen
 	 * at runtime. That way, we can postpone the firmware download from
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] ASoC: adau1701: more direct regmap usage
  2013-06-27 20:00 [PATCH 1/2] ASoC: adau1701: more direct regmap usage Daniel Mack
  2013-06-27 20:00 ` [PATCH 2/2] ASoC: adau1701: remove control_data assignment Daniel Mack
@ 2013-06-29 12:09 ` Lars-Peter Clausen
  2013-06-30 11:42 ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Lars-Peter Clausen @ 2013-06-29 12:09 UTC (permalink / raw)
  To: Daniel Mack; +Cc: alsa-devel, broonie

On 06/27/2013 10:00 PM, Daniel Mack wrote:
> 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>

Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] ASoC: adau1701: remove control_data assignment
  2013-06-27 20:00 ` [PATCH 2/2] ASoC: adau1701: remove control_data assignment Daniel Mack
@ 2013-06-29 12:09   ` Lars-Peter Clausen
  0 siblings, 0 replies; 5+ messages in thread
From: Lars-Peter Clausen @ 2013-06-29 12:09 UTC (permalink / raw)
  To: Daniel Mack; +Cc: alsa-devel, broonie

On 06/27/2013 10:00 PM, Daniel Mack wrote:
> codec->control_data has to be left unset to make the ASoC core access the
> regmap properly.
> 
> That bug slipped in during a rebase session of the driver refactoring.
> 
> Signed-off-by: Daniel Mack <zonque@gmail.com>


Acked-by: Lars-Peter Clausen <lars@metafoo.de>

Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] ASoC: adau1701: more direct regmap usage
  2013-06-27 20:00 [PATCH 1/2] ASoC: adau1701: more direct regmap usage Daniel Mack
  2013-06-27 20:00 ` [PATCH 2/2] ASoC: adau1701: remove control_data assignment Daniel Mack
  2013-06-29 12:09 ` [PATCH 1/2] ASoC: adau1701: more direct regmap usage Lars-Peter Clausen
@ 2013-06-30 11:42 ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2013-06-30 11:42 UTC (permalink / raw)
  To: Daniel Mack; +Cc: alsa-devel, lars


[-- Attachment #1.1: Type: text/plain, Size: 152 bytes --]

On Thu, Jun 27, 2013 at 10:00:04PM +0200, Daniel Mack wrote:
> Replace calls to snd_soc_update_bits() with regmap_update_bits().

Applied both, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-06-30 11:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-27 20:00 [PATCH 1/2] ASoC: adau1701: more direct regmap usage Daniel Mack
2013-06-27 20:00 ` [PATCH 2/2] ASoC: adau1701: remove control_data assignment Daniel Mack
2013-06-29 12:09   ` Lars-Peter Clausen
2013-06-29 12:09 ` [PATCH 1/2] ASoC: adau1701: more direct regmap usage Lars-Peter Clausen
2013-06-30 11:42 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.