* [PATCH 0/5] AD1836 updates part two
@ 2011-06-15 19:29 Mike Frysinger
2011-06-15 19:29 ` [PATCH 1/5] ASoC: AD1836: drop unnecessary spi register check Mike Frysinger
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Mike Frysinger @ 2011-06-15 19:29 UTC (permalink / raw)
To: alsa-devel, Liam Girdwood, Mark Brown
Cc: Lars-Peter Clausen, device-drivers-devel
This replaces the patchset I sent out yesterday. It mostly syncs the
missing work we had locally with what Lars-Peter did. I guess we can
omit the "ad1836" -> "ad183x" rename.
Barry Song (1):
ASoC: AD1836: rename suspend/resume funcs
Mike Frysinger (4):
ASoC: AD1836: drop unnecessary spi register check
ASoC: AD1836: fix intermixed tab/space indentation
ASoC: AD1836: fix codec name
ASoC: AD1836: clean up comment headers
sound/soc/codecs/ad1836.c | 78 +++++++++++++++++---------------------------
sound/soc/codecs/ad1836.h | 21 +++---------
2 files changed, 36 insertions(+), 63 deletions(-)
--
1.7.5.3
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/5] ASoC: AD1836: drop unnecessary spi register check
2011-06-15 19:29 [PATCH 0/5] AD1836 updates part two Mike Frysinger
@ 2011-06-15 19:29 ` Mike Frysinger
2011-06-15 19:29 ` [PATCH 2/5] ASoC: AD1836: fix intermixed tab/space indentation Mike Frysinger
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Mike Frysinger @ 2011-06-15 19:29 UTC (permalink / raw)
To: alsa-devel, Liam Girdwood, Mark Brown
Cc: Lars-Peter Clausen, device-drivers-devel
The only thing the init func does is register a spi driver, so if that
fails, we return the value back up to the caller who will display an
error message for us. So drop the redundant checking/message.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
sound/soc/codecs/ad1836.c | 10 +---------
1 files changed, 1 insertions(+), 9 deletions(-)
diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c
index e3a9493..afe09b3 100644
--- a/sound/soc/codecs/ad1836.c
+++ b/sound/soc/codecs/ad1836.c
@@ -394,15 +394,7 @@ static struct spi_driver ad1836_spi_driver = {
static int __init ad1836_init(void)
{
- int ret;
-
- ret = spi_register_driver(&ad1836_spi_driver);
- if (ret != 0) {
- printk(KERN_ERR "Failed to register ad1836 SPI driver: %d\n",
- ret);
- }
-
- return ret;
+ return spi_register_driver(&ad1836_spi_driver);
}
module_init(ad1836_init);
--
1.7.5.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/5] ASoC: AD1836: fix intermixed tab/space indentation
2011-06-15 19:29 [PATCH 0/5] AD1836 updates part two Mike Frysinger
2011-06-15 19:29 ` [PATCH 1/5] ASoC: AD1836: drop unnecessary spi register check Mike Frysinger
@ 2011-06-15 19:29 ` Mike Frysinger
2011-06-15 19:29 ` [PATCH 3/5] ASoC: AD1836: fix codec name Mike Frysinger
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Mike Frysinger @ 2011-06-15 19:29 UTC (permalink / raw)
To: alsa-devel, Liam Girdwood, Mark Brown
Cc: Lars-Peter Clausen, device-drivers-devel
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
sound/soc/codecs/ad1836.c | 4 ++--
sound/soc/codecs/ad1836.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c
index afe09b3..7d6aae8 100644
--- a/sound/soc/codecs/ad1836.c
+++ b/sound/soc/codecs/ad1836.c
@@ -331,8 +331,8 @@ static int ad1836_remove(struct snd_soc_codec *codec)
}
static struct snd_soc_codec_driver soc_codec_dev_ad1836 = {
- .probe = ad1836_probe,
- .remove = ad1836_remove,
+ .probe = ad1836_probe,
+ .remove = ad1836_remove,
.suspend = ad1836_soc_suspend,
.resume = ad1836_soc_resume,
.reg_cache_size = AD1836_NUM_REGS,
diff --git a/sound/soc/codecs/ad1836.h b/sound/soc/codecs/ad1836.h
index f13402f..80c24fd 100644
--- a/sound/soc/codecs/ad1836.h
+++ b/sound/soc/codecs/ad1836.h
@@ -21,7 +21,7 @@
#define AD1836_DAC_CTRL1 0
#define AD1836_DAC_POWERDOWN 2
-#define AD1836_DAC_SERFMT_MASK 0xE0
+#define AD1836_DAC_SERFMT_MASK 0xE0
#define AD1836_DAC_SERFMT_PCK256 (0x4 << 5)
#define AD1836_DAC_SERFMT_PCK128 (0x5 << 5)
#define AD1836_DAC_WORD_LEN_MASK 0x18
@@ -44,7 +44,7 @@
#define AD1836_ADC_CTRL2 13
#define AD1836_ADC_WORD_LEN_MASK 0x30
#define AD1836_ADC_WORD_OFFSET 5
-#define AD1836_ADC_SERFMT_MASK (7 << 6)
+#define AD1836_ADC_SERFMT_MASK (7 << 6)
#define AD1836_ADC_SERFMT_PCK256 (0x4 << 6)
#define AD1836_ADC_SERFMT_PCK128 (0x5 << 6)
#define AD1836_ADC_AUX (0x6 << 6)
--
1.7.5.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/5] ASoC: AD1836: fix codec name
2011-06-15 19:29 [PATCH 0/5] AD1836 updates part two Mike Frysinger
2011-06-15 19:29 ` [PATCH 1/5] ASoC: AD1836: drop unnecessary spi register check Mike Frysinger
2011-06-15 19:29 ` [PATCH 2/5] ASoC: AD1836: fix intermixed tab/space indentation Mike Frysinger
@ 2011-06-15 19:29 ` Mike Frysinger
2011-06-15 19:29 ` [PATCH 4/5] ASoC: AD1836: rename suspend/resume funcs Mike Frysinger
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Mike Frysinger @ 2011-06-15 19:29 UTC (permalink / raw)
To: alsa-devel, Liam Girdwood, Mark Brown
Cc: Lars-Peter Clausen, device-drivers-devel
The codec name should not have a "-codec" suffix since this is not part of
a MFD. This was incorrectly changed during the multi-component updated.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
sound/soc/codecs/ad1836.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c
index 7d6aae8..fc14668 100644
--- a/sound/soc/codecs/ad1836.c
+++ b/sound/soc/codecs/ad1836.c
@@ -384,7 +384,7 @@ MODULE_DEVICE_TABLE(spi, ad1836_ids);
static struct spi_driver ad1836_spi_driver = {
.driver = {
- .name = "ad1836-codec",
+ .name = "ad1836",
.owner = THIS_MODULE,
},
.probe = ad1836_spi_probe,
--
1.7.5.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/5] ASoC: AD1836: rename suspend/resume funcs
2011-06-15 19:29 [PATCH 0/5] AD1836 updates part two Mike Frysinger
` (2 preceding siblings ...)
2011-06-15 19:29 ` [PATCH 3/5] ASoC: AD1836: fix codec name Mike Frysinger
@ 2011-06-15 19:29 ` Mike Frysinger
2011-06-15 19:29 ` [PATCH 5/5] ASoC: AD1836: clean up comment headers Mike Frysinger
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Mike Frysinger @ 2011-06-15 19:29 UTC (permalink / raw)
To: alsa-devel, Liam Girdwood, Mark Brown
Cc: Scott Jiang, Lars-Peter Clausen, device-drivers-devel, Barry Song
From: Barry Song <barry.song@analog.com>
Use less specific names for suspend/resume to match the probe/remove funcs
where these are now used.
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Scott Jiang <scott.jiang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
sound/soc/codecs/ad1836.c | 43 +++++++++++++++++++++----------------------
1 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c
index fc14668..b9a5bab 100644
--- a/sound/soc/codecs/ad1836.c
+++ b/sound/soc/codecs/ad1836.c
@@ -198,26 +198,6 @@ static int ad1836_hw_params(struct snd_pcm_substream *substream,
return 0;
}
-#ifdef CONFIG_PM
-static int ad1836_soc_suspend(struct snd_soc_codec *codec,
- pm_message_t state)
-{
- /* reset clock control mode */
- return snd_soc_update_bits(codec, AD1836_ADC_CTRL2,
- AD1836_ADC_SERFMT_MASK, 0);
-}
-
-static int ad1836_soc_resume(struct snd_soc_codec *codec)
-{
- /* restore clock control mode */
- return snd_soc_update_bits(codec, AD1836_ADC_CTRL2,
- AD1836_ADC_SERFMT_MASK, AD1836_ADC_AUX);
-}
-#else
-#define ad1836_soc_suspend NULL
-#define ad1836_soc_resume NULL
-#endif
-
static struct snd_soc_dai_ops ad1836_dai_ops = {
.hw_params = ad1836_hw_params,
.set_fmt = ad1836_set_dai_fmt,
@@ -251,6 +231,25 @@ static struct snd_soc_dai_driver ad183x_dais[] = {
[AD1838] = AD183X_DAI("ad1838", 3, 1),
};
+#ifdef CONFIG_PM
+static int ad1836_suspend(struct snd_soc_codec *codec, pm_message_t state)
+{
+ /* reset clock control mode */
+ return snd_soc_update_bits(codec, AD1836_ADC_CTRL2,
+ AD1836_ADC_SERFMT_MASK, 0);
+}
+
+static int ad1836_resume(struct snd_soc_codec *codec)
+{
+ /* restore clock control mode */
+ return snd_soc_update_bits(codec, AD1836_ADC_CTRL2,
+ AD1836_ADC_SERFMT_MASK, AD1836_ADC_AUX);
+}
+#else
+#define ad1836_suspend NULL
+#define ad1836_resume NULL
+#endif
+
static int ad1836_probe(struct snd_soc_codec *codec)
{
struct ad1836_priv *ad1836 = snd_soc_codec_get_drvdata(codec);
@@ -333,8 +332,8 @@ static int ad1836_remove(struct snd_soc_codec *codec)
static struct snd_soc_codec_driver soc_codec_dev_ad1836 = {
.probe = ad1836_probe,
.remove = ad1836_remove,
- .suspend = ad1836_soc_suspend,
- .resume = ad1836_soc_resume,
+ .suspend = ad1836_suspend,
+ .resume = ad1836_resume,
.reg_cache_size = AD1836_NUM_REGS,
.reg_word_size = sizeof(u16),
--
1.7.5.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/5] ASoC: AD1836: clean up comment headers
2011-06-15 19:29 [PATCH 0/5] AD1836 updates part two Mike Frysinger
` (3 preceding siblings ...)
2011-06-15 19:29 ` [PATCH 4/5] ASoC: AD1836: rename suspend/resume funcs Mike Frysinger
@ 2011-06-15 19:29 ` Mike Frysinger
2011-06-16 8:35 ` [PATCH 0/5] AD1836 updates part two Liam Girdwood
2011-06-16 10:42 ` Mark Brown
6 siblings, 0 replies; 8+ messages in thread
From: Mike Frysinger @ 2011-06-15 19:29 UTC (permalink / raw)
To: alsa-devel, Liam Girdwood, Mark Brown
Cc: Lars-Peter Clausen, device-drivers-devel
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
sound/soc/codecs/ad1836.c | 19 +++++--------------
sound/soc/codecs/ad1836.h | 17 ++++-------------
2 files changed, 9 insertions(+), 27 deletions(-)
diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c
index b9a5bab..4e5c572 100644
--- a/sound/soc/codecs/ad1836.c
+++ b/sound/soc/codecs/ad1836.c
@@ -1,19 +1,10 @@
-/*
- * File: sound/soc/codecs/ad1836.c
- * Author: Barry Song <Barry.Song@analog.com>
- *
- * Created: Aug 04 2009
- * Description: Driver for AD1836 sound chip
- *
- * Modified:
- * Copyright 2009 Analog Devices Inc.
+ /*
+ * Audio Codec driver supporting:
+ * AD1835A, AD1836, AD1837A, AD1838A, AD1839A
*
- * Bugs: Enter bugs at http://blackfin.uclinux.org/
+ * Copyright 2009-2011 Analog Devices Inc.
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * Licensed under the GPL-2 or later.
*/
#include <linux/init.h>
diff --git a/sound/soc/codecs/ad1836.h b/sound/soc/codecs/ad1836.h
index 80c24fd..444747f 100644
--- a/sound/soc/codecs/ad1836.h
+++ b/sound/soc/codecs/ad1836.h
@@ -1,19 +1,10 @@
/*
- * File: sound/soc/codecs/ad1836.h
- * Based on:
- * Author: Barry Song <Barry.Song@analog.com>
+ * Audio Codec driver supporting:
+ * AD1835A, AD1836, AD1837A, AD1838A, AD1839A
*
- * Created: Aug 04, 2009
- * Description: definitions for AD1836 registers
+ * Copyright 2009-2011 Analog Devices Inc.
*
- * Modified:
- *
- * Bugs: Enter bugs at http://blackfin.uclinux.org/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * Licensed under the GPL-2 or later.
*/
#ifndef __AD1836_H__
--
1.7.5.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 0/5] AD1836 updates part two
2011-06-15 19:29 [PATCH 0/5] AD1836 updates part two Mike Frysinger
` (4 preceding siblings ...)
2011-06-15 19:29 ` [PATCH 5/5] ASoC: AD1836: clean up comment headers Mike Frysinger
@ 2011-06-16 8:35 ` Liam Girdwood
2011-06-16 10:42 ` Mark Brown
6 siblings, 0 replies; 8+ messages in thread
From: Liam Girdwood @ 2011-06-16 8:35 UTC (permalink / raw)
To: Mike Frysinger
Cc: alsa-devel, Mark Brown, Lars-Peter Clausen, device-drivers-devel,
Liam Girdwood
On 15/06/11 20:29, Mike Frysinger wrote:
> This replaces the patchset I sent out yesterday. It mostly syncs the
> missing work we had locally with what Lars-Peter did. I guess we can
> omit the "ad1836" -> "ad183x" rename.
>
> Barry Song (1):
> ASoC: AD1836: rename suspend/resume funcs
>
> Mike Frysinger (4):
> ASoC: AD1836: drop unnecessary spi register check
> ASoC: AD1836: fix intermixed tab/space indentation
> ASoC: AD1836: fix codec name
> ASoC: AD1836: clean up comment headers
>
> sound/soc/codecs/ad1836.c | 78 +++++++++++++++++---------------------------
> sound/soc/codecs/ad1836.h | 21 +++---------
> 2 files changed, 36 insertions(+), 63 deletions(-)
>
All
Acked-by: Liam Girdwood <lrg@ti.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/5] AD1836 updates part two
2011-06-15 19:29 [PATCH 0/5] AD1836 updates part two Mike Frysinger
` (5 preceding siblings ...)
2011-06-16 8:35 ` [PATCH 0/5] AD1836 updates part two Liam Girdwood
@ 2011-06-16 10:42 ` Mark Brown
6 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2011-06-16 10:42 UTC (permalink / raw)
To: Mike Frysinger
Cc: alsa-devel, Lars-Peter Clausen, device-drivers-devel, Liam Girdwood
On Wed, Jun 15, 2011 at 03:29:18PM -0400, Mike Frysinger wrote:
> This replaces the patchset I sent out yesterday. It mostly syncs the
> missing work we had locally with what Lars-Peter did. I guess we can
> omit the "ad1836" -> "ad183x" rename.
Applied all, thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-06-16 10:42 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-15 19:29 [PATCH 0/5] AD1836 updates part two Mike Frysinger
2011-06-15 19:29 ` [PATCH 1/5] ASoC: AD1836: drop unnecessary spi register check Mike Frysinger
2011-06-15 19:29 ` [PATCH 2/5] ASoC: AD1836: fix intermixed tab/space indentation Mike Frysinger
2011-06-15 19:29 ` [PATCH 3/5] ASoC: AD1836: fix codec name Mike Frysinger
2011-06-15 19:29 ` [PATCH 4/5] ASoC: AD1836: rename suspend/resume funcs Mike Frysinger
2011-06-15 19:29 ` [PATCH 5/5] ASoC: AD1836: clean up comment headers Mike Frysinger
2011-06-16 8:35 ` [PATCH 0/5] AD1836 updates part two Liam Girdwood
2011-06-16 10:42 ` Mark Brown
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.