Skip to content

Commit fb762a5

Browse files
Jesse Marroquinbroonie
authored andcommitted
ASoC: Add support for MAX98089 CODEC
This patch adds initial support for the MAX98089 CODEC. Signed-off-by: Jesse Marroquin <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent bedad0c commit fb762a5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

sound/soc/codecs/max98088.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828
#include <sound/max98088.h>
2929
#include "max98088.h"
3030

31+
enum max98088_type {
32+
MAX98088,
33+
MAX98089,
34+
};
35+
3136
struct max98088_cdata {
3237
unsigned int rate;
3338
unsigned int fmt;
@@ -36,6 +41,7 @@ struct max98088_cdata {
3641

3742
struct max98088_priv {
3843
u8 reg_cache[M98088_REG_CNT];
44+
enum max98088_type devtype;
3945
void *control_data;
4046
struct max98088_pdata *pdata;
4147
unsigned int sysclk;
@@ -2040,6 +2046,8 @@ static int max98088_i2c_probe(struct i2c_client *i2c,
20402046
if (max98088 == NULL)
20412047
return -ENOMEM;
20422048

2049+
max98088->devtype = id->driver_data;
2050+
20432051
i2c_set_clientdata(i2c, max98088);
20442052
max98088->control_data = i2c;
20452053
max98088->pdata = i2c->dev.platform_data;
@@ -2059,7 +2067,8 @@ static int __devexit max98088_i2c_remove(struct i2c_client *client)
20592067
}
20602068

20612069
static const struct i2c_device_id max98088_i2c_id[] = {
2062-
{ "max98088", 0 },
2070+
{ "max98088", MAX98088 },
2071+
{ "max98089", MAX98089 },
20632072
{ }
20642073
};
20652074
MODULE_DEVICE_TABLE(i2c, max98088_i2c_id);

0 commit comments

Comments
 (0)