From: timothyc.howe@gmail.com
To: alsa-devel@alsa-project.org
Cc: brian.austin@cirrus.com, broonie@kernel.org, lgirdwood@gmail.com,
Tim Howe <tim.howe@cirrus.com>
Subject: [PATCH v2] ASoC: cs4349: Add support for Cirrus Logic CS4349
Date: Tue, 14 Jul 2015 19:44:11 -0500 [thread overview]
Message-ID: <55a5ace1.6267320a.46fe.ffff95ab@mx.google.com> (raw)
From: Tim Howe <tim.howe@cirrus.com>
Signed-off-by: Tim Howe <tim.howe@cirrus.com>
---
sound/soc/codecs/cs4349.c | 27 ++++++++-------------------
1 file changed, 8 insertions(+), 19 deletions(-)
diff --git a/sound/soc/codecs/cs4349.c b/sound/soc/codecs/cs4349.c
index c9a96b6..ee6b676 100644
--- a/sound/soc/codecs/cs4349.c
+++ b/sound/soc/codecs/cs4349.c
@@ -305,19 +305,8 @@ static int cs4349_i2c_probe(struct i2c_client *client,
return ret;
}
- if (pdata) {
+ if (pdata)
cs4349->pdata = *pdata;
- } else {
- pdata = devm_kzalloc(&client->dev,
- sizeof(struct cs4349_platform_data),
- GFP_KERNEL);
- if (!pdata) {
- dev_err(&client->dev,
- "could not allocate pdata\n");
- return -ENOMEM;
- }
- cs4349->pdata = *pdata;
- }
/* Reset the Device */
cs4349->reset_gpio = devm_gpiod_get_optional(&client->dev,
@@ -330,9 +319,6 @@ static int cs4349_i2c_probe(struct i2c_client *client,
i2c_set_clientdata(client, cs4349);
- dev_info(&client->dev,
- "Cirrus Logic CS4349\n");
-
return snd_soc_register_codec(&client->dev, &soc_codec_dev_cs4349,
&cs4349_dai, 1);
}
@@ -357,14 +343,17 @@ static int cs4349_runtime_suspend(struct device *dev)
struct snd_soc_pcm_runtime *rtd = dev_get_drvdata(dev);
int ret;
- /* Hold down reset */
- if (cs4349->reset_gpio)
- gpiod_set_value_cansleep(cs4349->reset_gpio, 0);
-
ret = snd_soc_update_bits(rtd->codec, CS4349_MISC, PWR_DWN, 1);
if (ret < 0)
return ret;
+ regcache_cache_only(cs4349->regmap, true);
+ regcache_sync(cs4349->regmap);
+
+ /* Hold down reset */
+ if (cs4349->reset_gpio)
+ gpiod_set_value_cansleep(cs4349->reset_gpio, 0);
+
return 0;
}
--
2.4.5
next reply other threads:[~2015-07-15 0:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-15 0:44 timothyc.howe [this message]
2015-07-15 0:51 ` [PATCH v2] ASoC: cs4349: Add support for Cirrus Logic CS4349 Howe, Tim
-- strict thread matches above, loose matches on Subject: below --
2015-07-15 1:23 timothyc.howe
2015-07-15 11:49 ` 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=55a5ace1.6267320a.46fe.ffff95ab@mx.google.com \
--to=timothyc.howe@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=brian.austin@cirrus.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=tim.howe@cirrus.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox