alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: Use SGTL5000_LINREG_VDDD_MASK instead of hardcoded mask value
@ 2011-10-20 10:49 Axel Lin
  2011-10-20 11:02 ` Wolfram Sang
  2011-10-21  8:56 ` Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Axel Lin @ 2011-10-20 10:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Zeng Zhaoming, Wolfram Sang, Liam Girdwood, Mark Brown,
	alsa-devel

We have defined SGTL5000_LINREG_VDDD_MASK in sgtl5000.h,
use it instead of hardcoded (0x1 << 4) - 1 for the mask.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/soc/codecs/sgtl5000.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 8395002..32b5bbd 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -754,7 +754,7 @@ static int ldo_regulator_enable(struct regulator_dev *dev)
 
 	/* set voltage to register */
 	snd_soc_update_bits(codec, SGTL5000_CHIP_LINREG_CTRL,
-				(0x1 << 4) - 1, reg);
+				SGTL5000_LINREG_VDDD_MASK, reg);
 
 	snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER,
 				SGTL5000_LINEREG_D_POWERUP,
@@ -780,7 +780,7 @@ static int ldo_regulator_disable(struct regulator_dev *dev)
 
 	/* clear voltage info */
 	snd_soc_update_bits(codec, SGTL5000_CHIP_LINREG_CTRL,
-				(0x1 << 4) - 1, 0);
+				SGTL5000_LINREG_VDDD_MASK, 0);
 
 	ldo->enabled = 0;
 
@@ -1115,7 +1115,7 @@ static int sgtl5000_set_power_regs(struct snd_soc_codec *codec)
 
 	/* set voltage to register */
 	snd_soc_update_bits(codec, SGTL5000_CHIP_LINREG_CTRL,
-				(0x1 << 4) - 1, 0x8);
+				SGTL5000_LINREG_VDDD_MASK, 0x8);
 
 	/*
 	 * if vddd linear reg has been enabled,
-- 
1.7.5.4

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

* Re: [PATCH] ASoC: Use SGTL5000_LINREG_VDDD_MASK instead of hardcoded mask value
  2011-10-20 10:49 [PATCH] ASoC: Use SGTL5000_LINREG_VDDD_MASK instead of hardcoded mask value Axel Lin
@ 2011-10-20 11:02 ` Wolfram Sang
  2011-10-20 16:54   ` Girdwood, Liam
  2011-10-21  8:56 ` Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2011-10-20 11:02 UTC (permalink / raw)
  To: Axel Lin; +Cc: Zeng Zhaoming, alsa-devel, Mark Brown, linux-kernel,
	Liam Girdwood


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

On Thu, Oct 20, 2011 at 06:49:29PM +0800, Axel Lin wrote:
> We have defined SGTL5000_LINREG_VDDD_MASK in sgtl5000.h,
> use it instead of hardcoded (0x1 << 4) - 1 for the mask.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Acked-by: Wolfram Sang <w.sang@pengutronix.de>

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

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



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

* Re: [PATCH] ASoC: Use SGTL5000_LINREG_VDDD_MASK instead of hardcoded mask value
  2011-10-20 11:02 ` Wolfram Sang
@ 2011-10-20 16:54   ` Girdwood, Liam
  0 siblings, 0 replies; 4+ messages in thread
From: Girdwood, Liam @ 2011-10-20 16:54 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Axel Lin, linux-kernel, Zeng Zhaoming, Mark Brown, alsa-devel

On 20 October 2011 12:02, Wolfram Sang <w.sang@pengutronix.de> wrote:
> On Thu, Oct 20, 2011 at 06:49:29PM +0800, Axel Lin wrote:
>> We have defined SGTL5000_LINREG_VDDD_MASK in sgtl5000.h,
>> use it instead of hardcoded (0x1 << 4) - 1 for the mask.
>>
>> Signed-off-by: Axel Lin <axel.lin@gmail.com>
>
> Acked-by: Wolfram Sang <w.sang@pengutronix.de>
>

Acked-by: Liam Girdwood <lrg@ti.com>

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

* Re: [PATCH] ASoC: Use SGTL5000_LINREG_VDDD_MASK instead of hardcoded mask value
  2011-10-20 10:49 [PATCH] ASoC: Use SGTL5000_LINREG_VDDD_MASK instead of hardcoded mask value Axel Lin
  2011-10-20 11:02 ` Wolfram Sang
@ 2011-10-21  8:56 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2011-10-21  8:56 UTC (permalink / raw)
  To: Axel Lin
  Cc: Zeng Zhaoming, alsa-devel, Liam Girdwood, linux-kernel,
	Wolfram Sang

On Thu, Oct 20, 2011 at 06:49:29PM +0800, Axel Lin wrote:
> We have defined SGTL5000_LINREG_VDDD_MASK in sgtl5000.h,
> use it instead of hardcoded (0x1 << 4) - 1 for the mask.

Applied, thanks.

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

end of thread, other threads:[~2011-10-21  8:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-20 10:49 [PATCH] ASoC: Use SGTL5000_LINREG_VDDD_MASK instead of hardcoded mask value Axel Lin
2011-10-20 11:02 ` Wolfram Sang
2011-10-20 16:54   ` Girdwood, Liam
2011-10-21  8:56 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).