Skip to content

Commit

Permalink
ASoC: Use SGTL5000_LINREG_VDDD_MASK instead of hardcoded mask value
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Axel Lin authored and Mark Brown committed Oct 21, 2011
1 parent 5b13de7 commit 064a4bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sound/soc/codecs/sgtl5000.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 064a4bc

Please sign in to comment.