aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/codecs/rt298.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt298.c b/sound/soc/codecs/rt298.c
index 52aacb1d5e4c..a1aaffc20862 100644
--- a/sound/soc/codecs/rt298.c
+++ b/sound/soc/codecs/rt298.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>
@@ -1132,6 +1133,17 @@ static const struct acpi_device_id rt298_acpi_match[] = {
1132}; 1133};
1133MODULE_DEVICE_TABLE(acpi, rt298_acpi_match); 1134MODULE_DEVICE_TABLE(acpi, rt298_acpi_match);
1134 1135
1136static const struct dmi_system_id force_combo_jack_table[] = {
1137 {
1138 .ident = "Intel Broxton P",
1139 .matches = {
1140 DMI_MATCH(DMI_SYS_VENDOR, "Intel Corp"),
1141 DMI_MATCH(DMI_PRODUCT_NAME, "Broxton P")
1142 }
1143 },
1144 { }
1145};
1146
1135static int rt298_i2c_probe(struct i2c_client *i2c, 1147static int rt298_i2c_probe(struct i2c_client *i2c,
1136 const struct i2c_device_id *id) 1148 const struct i2c_device_id *id)
1137{ 1149{
@@ -1189,6 +1201,11 @@ static int rt298_i2c_probe(struct i2c_client *i2c,
1189 acpiid->driver_data; 1201 acpiid->driver_data;
1190 } 1202 }
1191 1203
1204 if (dmi_check_system(force_combo_jack_table)) {
1205 rt298->pdata.cbj_en = true;
1206 rt298->pdata.gpio2_en = false;
1207 }
1208
1192 /* VREF Charging */ 1209 /* VREF Charging */
1193 regmap_update_bits(rt298->regmap, 0x04, 0x80, 0x80); 1210 regmap_update_bits(rt298->regmap, 0x04, 0x80, 0x80);
1194 regmap_update_bits(rt298->regmap, 0x1b, 0x860, 0x860); 1211 regmap_update_bits(rt298->regmap, 0x1b, 0x860, 0x860);