tas571x: use symbolic register offsets
diff mbox series

Message ID 20200212161644.GF25353@lemon.iwr.uni-heidelberg.de
State New
Headers show
Series
  • tas571x: use symbolic register offsets
Related show

Commit Message

Hermann Lauer Feb. 12, 2020, 4:16 p.m. UTC
Hello,
the appended patch converts the numeric register offsets in tas5711_reg_defaults to the defined constants TAS571X_*

Tested with a tas5713 chip for which the driver works, too.

Thanks,
 greetings
   Hermann

Patch
diff mbox series

# HG changeset patch
# Parent  73b0fe67928fff171bb722fc90e3df2f758b14fc

diff --git a/sound/soc/codecs/tas571x.c b/sound/soc/codecs/tas571x.c
--- a/sound/soc/codecs/tas571x.c
+++ b/sound/soc/codecs/tas571x.c
@@ -424,13 +424,13 @@ 
 };
 
 static const struct reg_default tas5711_reg_defaults[] = {
-	{ 0x04, 0x05 },
-	{ 0x05, 0x40 },
-	{ 0x06, 0x00 },
-	{ 0x07, 0xff },
-	{ 0x08, 0x30 },
-	{ 0x09, 0x30 },
-	{ 0x1b, 0x82 },
+	{ TAS571X_SDI_REG,		0x05 },
+	{ TAS571X_SYS_CTRL_2_REG,	0x40 },
+	{ TAS571X_SOFT_MUTE_REG,	0x00 },
+	{ TAS571X_MVOL_REG,		0xff },
+	{ TAS571X_CH1_VOL_REG,		0x30 },
+	{ TAS571X_CH2_VOL_REG,		0x30 },
+	{ TAS571X_OSC_TRIM_REG,		0x82 },
 };
 
 static const struct regmap_config tas5711_regmap_config = {