asoc: codecs: rt5640:Enable rt5439
Vinod Subbarayalu [Wed, 21 Nov 2012 03:52:23 +0000 (19:52 -0800)]
Change-Id: I13a8a915ec93004cf0e73fcefb821547a52481c3
Signed-off-by: Vinod Subbarayalu <vsubbarayalu@nvidia.com>
(cherry picked from commit 62a04e4501a46eaef69794eb5e13fbb425889d30)
Reviewed-on: http://git-master/r/166417
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Scott Peterson <speterson@nvidia.com>

sound/soc/codecs/rt5640.c

index 4b75f9a..71f6467 100644 (file)
@@ -32,6 +32,7 @@
 #define RT5640_DEMO 1
 #define RT5640_REG_RW 1
 #define RT5640_DET_EXT_MIC 0
+#define RT5639_RESET_ID 0x0008
 
 #ifdef RT5640_DEMO
 struct rt5640_init_reg {
@@ -2388,9 +2389,9 @@ static int rt5640_probe(struct snd_soc_codec *codec)
        }
 
        val = snd_soc_read(codec, RT5640_RESET);
-       if (val != rt5640_reg[RT5640_RESET]) {
+       if ((val != rt5640_reg[RT5640_RESET]) && (val != RT5639_RESET_ID)) {
                dev_err(codec->dev,
-                       "Device with ID register %x is not a rt5640\n", val);
+                       "Device with ID register %x is not rt5640/39\n", val);
                return -ENODEV;
        }