All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Dobias <dobias@2n.cz>
To: <alsa-devel@alsa-project.org>
Cc: broonie@kernel.org, ladis@linux-mips.org, Pavel Dobias <dobias@2n.cz>
Subject: [PATCH 2/6] ASoC: max9867: don't use regmap defaults
Date: Wed, 20 May 2020 09:19:00 +0200	[thread overview]
Message-ID: <20200520071904.15801-2-dobias@2n.cz> (raw)
In-Reply-To: <20200520071904.15801-1-dobias@2n.cz>

MAX9867 codec doesn't have reset pin, so the registers don't
have default values in the case of reboot without powering off.
Remove the reg_defaults struct and let the regmap read initial
state of the registers at startup instead of taking them from
reg_defaults struct.

Signed-off-by: Pavel Dobias <dobias@2n.cz>
---
 sound/soc/codecs/max9867.c | 25 -------------------------
 1 file changed, 25 deletions(-)

diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c
index 6d49a1cc98c6..93431646f2c7 100644
--- a/sound/soc/codecs/max9867.c
+++ b/sound/soc/codecs/max9867.c
@@ -463,35 +463,10 @@ static bool max9867_volatile_register(struct device *dev, unsigned int reg)
 	}
 }
 
-static const struct reg_default max9867_reg[] = {
-	{ 0x04, 0x00 },
-	{ 0x05, 0x00 },
-	{ 0x06, 0x00 },
-	{ 0x07, 0x00 },
-	{ 0x08, 0x00 },
-	{ 0x09, 0x00 },
-	{ 0x0A, 0x00 },
-	{ 0x0B, 0x00 },
-	{ 0x0C, 0x00 },
-	{ 0x0D, 0x00 },
-	{ 0x0E, 0x40 },
-	{ 0x0F, 0x40 },
-	{ 0x10, 0x00 },
-	{ 0x11, 0x00 },
-	{ 0x12, 0x00 },
-	{ 0x13, 0x00 },
-	{ 0x14, 0x00 },
-	{ 0x15, 0x00 },
-	{ 0x16, 0x00 },
-	{ 0x17, 0x00 },
-};
-
 static const struct regmap_config max9867_regmap = {
 	.reg_bits	= 8,
 	.val_bits	= 8,
 	.max_register	= MAX9867_REVISION,
-	.reg_defaults	= max9867_reg,
-	.num_reg_defaults = ARRAY_SIZE(max9867_reg),
 	.volatile_reg	= max9867_volatile_register,
 	.cache_type	= REGCACHE_RBTREE,
 };
-- 
2.20.1


  reply	other threads:[~2020-05-20  7:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-20  7:18 [PATCH 1/6] ASoC: max9867: fix ADC level control Pavel Dobias
2020-05-20  7:19 ` Pavel Dobias [this message]
2020-05-20  7:19 ` [PATCH 3/6] ASoC: max9867: add filter controls Pavel Dobias
2020-05-20  7:19 ` [PATCH 4/6] ASoC: max9867: keep ADCs and DACs always on Pavel Dobias
2020-05-20 13:01   ` Mark Brown
2020-05-22 14:29     ` [PATCH v2 0/2] " Pavel Dobias
2020-05-22 14:29       ` [PATCH v2 1/2] ASoC: max9867: add digital microphone controls Pavel Dobias
2020-05-22 14:29       ` [PATCH v2 2/2] ASoC: max9867: keep ADCs and DACs always on Pavel Dobias
2020-05-22 19:00       ` [PATCH v2 0/2] " Mark Brown
2020-05-20  7:19 ` [PATCH 5/6] ASoC: max9867: add mono playback switch Pavel Dobias
2020-05-20  7:19 ` [PATCH 6/6] ASoC: max9867: add digital microphone controls Pavel Dobias
2020-05-20 17:17 ` [PATCH 1/6] ASoC: max9867: fix ADC level control Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200520071904.15801-2-dobias@2n.cz \
    --to=dobias@2n.cz \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ladis@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.