diff options
author | Bard Liao <bardliao@realtek.com> | 2014-11-05 20:59:59 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-06 00:50:55 -0500 |
commit | 6c67cde2aa88bb06cd039aa0f61b26df887075d7 (patch) | |
tree | ca18ab5d2ab4395d1430b9272e31af7f00051062 | |
parent | 6879db7648b6b995122afa98df31778c7af0855d (diff) |
ASoC: rt286: set combo jack by dmi
This patch enables combo jack configuration according to dmi.
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/rt286.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c index 97daa80e9104..d4acb64f477e 100644 --- a/sound/soc/codecs/rt286.c +++ b/sound/soc/codecs/rt286.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/i2c.h> | 17 | #include <linux/i2c.h> |
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <linux/spi/spi.h> | 19 | #include <linux/spi/spi.h> |
20 | #include <linux/dmi.h> | ||
20 | #include <linux/acpi.h> | 21 | #include <linux/acpi.h> |
21 | #include <sound/core.h> | 22 | #include <sound/core.h> |
22 | #include <sound/pcm.h> | 23 | #include <sound/pcm.h> |
@@ -1205,6 +1206,16 @@ static const struct acpi_device_id rt286_acpi_match[] = { | |||
1205 | }; | 1206 | }; |
1206 | MODULE_DEVICE_TABLE(acpi, rt286_acpi_match); | 1207 | MODULE_DEVICE_TABLE(acpi, rt286_acpi_match); |
1207 | 1208 | ||
1209 | static struct dmi_system_id force_combo_jack_table[] __initdata = { | ||
1210 | { | ||
1211 | .ident = "Intel Wilson Beach", | ||
1212 | .matches = { | ||
1213 | DMI_MATCH(DMI_BOARD_NAME, "Wilson Beach SDS") | ||
1214 | } | ||
1215 | }, | ||
1216 | { } | ||
1217 | }; | ||
1218 | |||
1208 | static int rt286_i2c_probe(struct i2c_client *i2c, | 1219 | static int rt286_i2c_probe(struct i2c_client *i2c, |
1209 | const struct i2c_device_id *id) | 1220 | const struct i2c_device_id *id) |
1210 | { | 1221 | { |
@@ -1240,6 +1251,9 @@ static int rt286_i2c_probe(struct i2c_client *i2c, | |||
1240 | if (pdata) | 1251 | if (pdata) |
1241 | rt286->pdata = *pdata; | 1252 | rt286->pdata = *pdata; |
1242 | 1253 | ||
1254 | if (dmi_check_system(force_combo_jack_table)) | ||
1255 | rt286->pdata.cbj_en = true; | ||
1256 | |||
1243 | regmap_write(rt286->regmap, RT286_SET_AUDIO_POWER, AC_PWRST_D3); | 1257 | regmap_write(rt286->regmap, RT286_SET_AUDIO_POWER, AC_PWRST_D3); |
1244 | 1258 | ||
1245 | for (i = 0; i < RT286_POWER_REG_LEN; i++) | 1259 | for (i = 0; i < RT286_POWER_REG_LEN; i++) |