diff options
-rw-r--r-- | include/sound/wm8960.h | 2 | ||||
-rw-r--r-- | sound/soc/codecs/wm8960.c | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/include/sound/wm8960.h b/include/sound/wm8960.h index 74e9a95529c5..b5a1ab9ebb4a 100644 --- a/include/sound/wm8960.h +++ b/include/sound/wm8960.h | |||
@@ -19,6 +19,8 @@ struct wm8960_data { | |||
19 | bool capless; /* Headphone outputs configured in capless mode */ | 19 | bool capless; /* Headphone outputs configured in capless mode */ |
20 | 20 | ||
21 | int dres; /* Discharge resistance for headphone outputs */ | 21 | int dres; /* Discharge resistance for headphone outputs */ |
22 | |||
23 | bool shared_lrclk; /* DAC and ADC LRCLKs are wired together */ | ||
22 | }; | 24 | }; |
23 | 25 | ||
24 | #endif | 26 | #endif |
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index 066250e3f7f4..782faa0a3b49 100644 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/codecs/wm8960.c | |||
@@ -1036,6 +1036,7 @@ static const struct regmap_config wm8960_regmap = { | |||
1036 | static __devinit int wm8960_i2c_probe(struct i2c_client *i2c, | 1036 | static __devinit int wm8960_i2c_probe(struct i2c_client *i2c, |
1037 | const struct i2c_device_id *id) | 1037 | const struct i2c_device_id *id) |
1038 | { | 1038 | { |
1039 | struct wm8960_data *pdata = dev_get_platdata(&i2c->dev); | ||
1039 | struct wm8960_priv *wm8960; | 1040 | struct wm8960_priv *wm8960; |
1040 | int ret; | 1041 | int ret; |
1041 | 1042 | ||
@@ -1048,6 +1049,16 @@ static __devinit int wm8960_i2c_probe(struct i2c_client *i2c, | |||
1048 | if (IS_ERR(wm8960->regmap)) | 1049 | if (IS_ERR(wm8960->regmap)) |
1049 | return PTR_ERR(wm8960->regmap); | 1050 | return PTR_ERR(wm8960->regmap); |
1050 | 1051 | ||
1052 | if (pdata && pdata->shared_lrclk) { | ||
1053 | ret = regmap_update_bits(wm8960->regmap, WM8960_ADDCTL2, | ||
1054 | 0x4, 0x4); | ||
1055 | if (ret != 0) { | ||
1056 | dev_err(&i2c->dev, "Failed to enable LRCM: %d\n", | ||
1057 | ret); | ||
1058 | return ret; | ||
1059 | } | ||
1060 | } | ||
1061 | |||
1051 | i2c_set_clientdata(i2c, wm8960); | 1062 | i2c_set_clientdata(i2c, wm8960); |
1052 | 1063 | ||
1053 | ret = snd_soc_register_codec(&i2c->dev, | 1064 | ret = snd_soc_register_codec(&i2c->dev, |