aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/codecs/max98088.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c
index bc22ee93a75..470cb93b1d1 100644
--- a/sound/soc/codecs/max98088.c
+++ b/sound/soc/codecs/max98088.c
@@ -28,6 +28,11 @@
28#include <sound/max98088.h> 28#include <sound/max98088.h>
29#include "max98088.h" 29#include "max98088.h"
30 30
31enum max98088_type {
32 MAX98088,
33 MAX98089,
34};
35
31struct max98088_cdata { 36struct max98088_cdata {
32 unsigned int rate; 37 unsigned int rate;
33 unsigned int fmt; 38 unsigned int fmt;
@@ -36,6 +41,7 @@ struct max98088_cdata {
36 41
37struct max98088_priv { 42struct max98088_priv {
38 u8 reg_cache[M98088_REG_CNT]; 43 u8 reg_cache[M98088_REG_CNT];
44 enum max98088_type devtype;
39 void *control_data; 45 void *control_data;
40 struct max98088_pdata *pdata; 46 struct max98088_pdata *pdata;
41 unsigned int sysclk; 47 unsigned int sysclk;
@@ -2040,6 +2046,8 @@ static int max98088_i2c_probe(struct i2c_client *i2c,
2040 if (max98088 == NULL) 2046 if (max98088 == NULL)
2041 return -ENOMEM; 2047 return -ENOMEM;
2042 2048
2049 max98088->devtype = id->driver_data;
2050
2043 i2c_set_clientdata(i2c, max98088); 2051 i2c_set_clientdata(i2c, max98088);
2044 max98088->control_data = i2c; 2052 max98088->control_data = i2c;
2045 max98088->pdata = i2c->dev.platform_data; 2053 max98088->pdata = i2c->dev.platform_data;
@@ -2059,7 +2067,8 @@ static int __devexit max98088_i2c_remove(struct i2c_client *client)
2059} 2067}
2060 2068
2061static const struct i2c_device_id max98088_i2c_id[] = { 2069static const struct i2c_device_id max98088_i2c_id[] = {
2062 { "max98088", 0 }, 2070 { "max98088", MAX98088 },
2071 { "max98089", MAX98089 },
2063 { } 2072 { }
2064}; 2073};
2065MODULE_DEVICE_TABLE(i2c, max98088_i2c_id); 2074MODULE_DEVICE_TABLE(i2c, max98088_i2c_id);