* [PATCH] ASoC: Add support for MAX98089 CODEC
@ 2010-11-17 20:26 Jesse Marroquin
2010-11-17 22:29 ` [alsa-devel] " Liam Girdwood
2010-11-18 11:07 ` Mark Brown
0 siblings, 2 replies; 6+ messages in thread
From: Jesse Marroquin @ 2010-11-17 20:26 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown,
Peter Hsiang, Dimitris Papastamos, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org
This patch adds initial support for the MAX98089 CODEC.
Signed-off-by: Jesse Marroquin <jesse.marroquin@maxim-ic.com>
---
sound/soc/codecs/max98088.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c
index ef06007..9c32237 100644
--- a/sound/soc/codecs/max98088.c
+++ b/sound/soc/codecs/max98088.c
@@ -28,6 +28,11 @@
#include <sound/max98088.h>
#include "max98088.h"
+enum max98088_type {
+ MAX98088,
+ MAX98089,
+};
+
struct max98088_cdata {
unsigned int rate;
unsigned int fmt;
@@ -36,6 +41,7 @@ struct max98088_cdata {
struct max98088_priv {
u8 reg_cache[M98088_REG_CNT];
+ enum max98088_type devtype;
void *control_data;
struct max98088_pdata *pdata;
unsigned int sysclk;
@@ -2042,6 +2048,8 @@ static int max98088_i2c_probe(struct i2c_client *i2c,
if (max98088 == NULL)
return -ENOMEM;
+ max98088->devtype = id->driver_data;
+
i2c_set_clientdata(i2c, max98088);
max98088->control_data = i2c;
max98088->pdata = i2c->dev.platform_data;
@@ -2061,7 +2069,8 @@ static int __devexit max98088_i2c_remove(struct i2c_client *client)
}
static const struct i2c_device_id max98088_i2c_id[] = {
- { "max98088", 0 },
+ { "max98088", MAX98088 },
+ { "max98089", MAX98089 },
{ }
};
MODULE_DEVICE_TABLE(i2c, max98088_i2c_id);
--
1.5.6.5
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] ASoC: Add support for MAX98089 CODEC
2010-11-17 20:26 [PATCH] ASoC: Add support for MAX98089 CODEC Jesse Marroquin
@ 2010-11-17 22:29 ` Liam Girdwood
2010-11-18 11:07 ` Mark Brown
1 sibling, 0 replies; 6+ messages in thread
From: Liam Girdwood @ 2010-11-17 22:29 UTC (permalink / raw)
To: Jesse Marroquin
Cc: Dimitris Papastamos, alsa-devel@alsa-project.org, Takashi Iwai,
Brown, linux-kernel@vger.kernel.org, Mark, Peter Hsiang
On Wed, 2010-11-17 at 14:26 -0600, Jesse Marroquin wrote:
> This patch adds initial support for the MAX98089 CODEC.
>
> Signed-off-by: Jesse Marroquin <jesse.marroquin@maxim-ic.com>
> ---
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [alsa-devel] [PATCH] ASoC: Add support for MAX98089 CODEC
@ 2010-11-17 22:29 ` Liam Girdwood
0 siblings, 0 replies; 6+ messages in thread
From: Liam Girdwood @ 2010-11-17 22:29 UTC (permalink / raw)
To: Jesse Marroquin
Cc: Jaroslav Kysela, Takashi Iwai, Mark Brown, Peter Hsiang,
Dimitris Papastamos, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org
On Wed, 2010-11-17 at 14:26 -0600, Jesse Marroquin wrote:
> This patch adds initial support for the MAX98089 CODEC.
>
> Signed-off-by: Jesse Marroquin <jesse.marroquin@maxim-ic.com>
> ---
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ASoC: Add support for MAX98089 CODEC
2010-11-17 20:26 [PATCH] ASoC: Add support for MAX98089 CODEC Jesse Marroquin
@ 2010-11-18 11:07 ` Mark Brown
2010-11-18 11:07 ` Mark Brown
1 sibling, 0 replies; 6+ messages in thread
From: Mark Brown @ 2010-11-18 11:07 UTC (permalink / raw)
To: Jesse Marroquin
Cc: Dimitris Papastamos, alsa-devel@alsa-project.org, Takashi Iwai,
linux-kernel@vger.kernel.org, Peter Hsiang, Liam Girdwood
On Wed, Nov 17, 2010 at 02:26:40PM -0600, Jesse Marroquin wrote:
> This patch adds initial support for the MAX98089 CODEC.
Applied, thanks. One thing:
> struct max98088_priv {
> u8 reg_cache[M98088_REG_CNT];
> + enum max98088_type devtype;
You currently never actually read the devtype anywhere - if the devices
really are fully register compatible (eg, if the differences are in
physical or electrical characteristics which aren't visible to software)
then there's no need to bother doing this, though equally well it does
no harm.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] ASoC: Add support for MAX98089 CODEC
@ 2010-11-18 11:07 ` Mark Brown
0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2010-11-18 11:07 UTC (permalink / raw)
To: Jesse Marroquin
Cc: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Peter Hsiang,
Dimitris Papastamos, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org
On Wed, Nov 17, 2010 at 02:26:40PM -0600, Jesse Marroquin wrote:
> This patch adds initial support for the MAX98089 CODEC.
Applied, thanks. One thing:
> struct max98088_priv {
> u8 reg_cache[M98088_REG_CNT];
> + enum max98088_type devtype;
You currently never actually read the devtype anywhere - if the devices
really are fully register compatible (eg, if the differences are in
physical or electrical characteristics which aren't visible to software)
then there's no need to bother doing this, though equally well it does
no harm.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ASoC: Add support for MAX98089 CODEC
@ 2010-11-17 20:26 Jesse Marroquin
0 siblings, 0 replies; 6+ messages in thread
From: Jesse Marroquin @ 2010-11-17 20:26 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown,
Peter Hsiang
This patch adds initial support for the MAX98089 CODEC.
Signed-off-by: Jesse Marroquin <jesse.marroquin@maxim-ic.com>
---
sound/soc/codecs/max98088.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c
index ef06007..9c32237 100644
--- a/sound/soc/codecs/max98088.c
+++ b/sound/soc/codecs/max98088.c
@@ -28,6 +28,11 @@
#include <sound/max98088.h>
#include "max98088.h"
+enum max98088_type {
+ MAX98088,
+ MAX98089,
+};
+
struct max98088_cdata {
unsigned int rate;
unsigned int fmt;
@@ -36,6 +41,7 @@ struct max98088_cdata {
struct max98088_priv {
u8 reg_cache[M98088_REG_CNT];
+ enum max98088_type devtype;
void *control_data;
struct max98088_pdata *pdata;
unsigned int sysclk;
@@ -2042,6 +2048,8 @@ static int max98088_i2c_probe(struct i2c_client *i2c,
if (max98088 == NULL)
return -ENOMEM;
+ max98088->devtype = id->driver_data;
+
i2c_set_clientdata(i2c, max98088);
max98088->control_data = i2c;
max98088->pdata = i2c->dev.platform_data;
@@ -2061,7 +2069,8 @@ static int __devexit max98088_i2c_remove(struct i2c_client *client)
}
static const struct i2c_device_id max98088_i2c_id[] = {
- { "max98088", 0 },
+ { "max98088", MAX98088 },
+ { "max98089", MAX98089 },
{ }
};
MODULE_DEVICE_TABLE(i2c, max98088_i2c_id);
--
1.5.6.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-11-18 11:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-17 20:26 [PATCH] ASoC: Add support for MAX98089 CODEC Jesse Marroquin
2010-11-17 22:29 ` Liam Girdwood
2010-11-17 22:29 ` [alsa-devel] " Liam Girdwood
2010-11-18 11:07 ` Mark Brown
2010-11-18 11:07 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2010-11-17 20:26 Jesse Marroquin
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.