Commit b9c17f13 authored by Vinod Koul's avatar Vinod Koul Committed by Mark Brown

ASoC: rt298: Add DMI match for Broxton-P reference platform

Broxton-P reference platform also uses combo jack for audio
connector so we need to set codec pdata to use this based on DMI
match for this board.
Signed-off-by: default avatarRamesh Babu <ramesh.babu@intel.com>
Signed-off-by: default avatarSenthilnathan Veppur <senthilnathanx.veppur@intel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
Acked-by: default avatarBard Liao <bardliao@realtek.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent bb7cb54b
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/dmi.h>
#include <linux/acpi.h> #include <linux/acpi.h>
#include <sound/core.h> #include <sound/core.h>
#include <sound/pcm.h> #include <sound/pcm.h>
...@@ -1132,6 +1133,17 @@ static const struct acpi_device_id rt298_acpi_match[] = { ...@@ -1132,6 +1133,17 @@ static const struct acpi_device_id rt298_acpi_match[] = {
}; };
MODULE_DEVICE_TABLE(acpi, rt298_acpi_match); MODULE_DEVICE_TABLE(acpi, rt298_acpi_match);
static const struct dmi_system_id force_combo_jack_table[] = {
{
.ident = "Intel Broxton P",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Intel Corp"),
DMI_MATCH(DMI_PRODUCT_NAME, "Broxton P")
}
},
{ }
};
static int rt298_i2c_probe(struct i2c_client *i2c, static int rt298_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id) const struct i2c_device_id *id)
{ {
...@@ -1189,6 +1201,11 @@ static int rt298_i2c_probe(struct i2c_client *i2c, ...@@ -1189,6 +1201,11 @@ static int rt298_i2c_probe(struct i2c_client *i2c,
acpiid->driver_data; acpiid->driver_data;
} }
if (dmi_check_system(force_combo_jack_table)) {
rt298->pdata.cbj_en = true;
rt298->pdata.gpio2_en = false;
}
/* VREF Charging */ /* VREF Charging */
regmap_update_bits(rt298->regmap, 0x04, 0x80, 0x80); regmap_update_bits(rt298->regmap, 0x04, 0x80, 0x80);
regmap_update_bits(rt298->regmap, 0x1b, 0x860, 0x860); regmap_update_bits(rt298->regmap, 0x1b, 0x860, 0x860);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment