Commit 064a4bce authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

ASoC: Use SGTL5000_LINREG_VDDD_MASK instead of hardcoded mask value

We have defined SGTL5000_LINREG_VDDD_MASK in sgtl5000.h,
use it instead of hardcoded (0x1 << 4) - 1 for the mask.
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarWolfram Sang <w.sang@pengutronix.de>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 5b13de7a
...@@ -754,7 +754,7 @@ static int ldo_regulator_enable(struct regulator_dev *dev) ...@@ -754,7 +754,7 @@ static int ldo_regulator_enable(struct regulator_dev *dev)
/* set voltage to register */ /* set voltage to register */
snd_soc_update_bits(codec, SGTL5000_CHIP_LINREG_CTRL, 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, snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER,
SGTL5000_LINEREG_D_POWERUP, SGTL5000_LINEREG_D_POWERUP,
...@@ -780,7 +780,7 @@ static int ldo_regulator_disable(struct regulator_dev *dev) ...@@ -780,7 +780,7 @@ static int ldo_regulator_disable(struct regulator_dev *dev)
/* clear voltage info */ /* clear voltage info */
snd_soc_update_bits(codec, SGTL5000_CHIP_LINREG_CTRL, snd_soc_update_bits(codec, SGTL5000_CHIP_LINREG_CTRL,
(0x1 << 4) - 1, 0); SGTL5000_LINREG_VDDD_MASK, 0);
ldo->enabled = 0; ldo->enabled = 0;
...@@ -1115,7 +1115,7 @@ static int sgtl5000_set_power_regs(struct snd_soc_codec *codec) ...@@ -1115,7 +1115,7 @@ static int sgtl5000_set_power_regs(struct snd_soc_codec *codec)
/* set voltage to register */ /* set voltage to register */
snd_soc_update_bits(codec, SGTL5000_CHIP_LINREG_CTRL, 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, * if vddd linear reg has been enabled,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment