summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/rt5645.c
diff options
context:
space:
mode:
authorIan W MORRISON <ianwmorrison@gmail.com>2017-08-31 01:35:47 +0300
committerMark Brown <broonie@kernel.org>2017-08-31 12:25:45 +0300
commit88faae2c2e35c88a806c052a7fc20948211b0895 (patch)
tree27f3a8e2f6b949e76d200fd3abe284e1b60ef653 /sound/soc/codecs/rt5645.c
parentcd6d6477f130c861c42e6eddc060e7c880e94bf3 (diff)
downloadlinux-88faae2c2e35c88a806c052a7fc20948211b0895.tar.xz
ASoC: rt5645: Add jack detection workaround for MINIX Z83-4 based devices
The MINIX NEO Z83-4 and MINIX NEO Z83-4 Pro devices requires jd_mode=3 to make the jack detection work. Using a BIOS DMI product of "Z83-4" will match both devices of 'NEO Z83-4' and 'Z83-4 Pro'. Signed-off-by: Ian W Morrison <ianwmorrison@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt5645.c')
-rw-r--r--sound/soc/codecs/rt5645.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index d2f038001908..2e145f089d9d 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -3655,6 +3655,21 @@ static struct dmi_system_id dmi_platform_asus_t100ha[] = {
{ }
};
+static struct rt5645_platform_data minix_z83_4_platform_data = {
+ .jd_mode = 3,
+};
+
+static struct dmi_system_id dmi_platform_minix_z83_4[] = {
+ {
+ .ident = "MINIX Z83-4",
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "MINIX"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Z83-4"),
+ },
+ },
+ { }
+};
+
static bool rt5645_check_dp(struct device *dev)
{
if (device_property_present(dev, "realtek,in2-differential") ||
@@ -3709,6 +3724,8 @@ static int rt5645_i2c_probe(struct i2c_client *i2c,
rt5645->pdata = gpd_win_platform_data;
else if (dmi_check_system(dmi_platform_asus_t100ha))
rt5645->pdata = general_platform_data2;
+ else if (dmi_check_system(dmi_platform_minix_z83_4))
+ rt5645->pdata = minix_z83_4_platform_data;
if (quirk != -1) {
rt5645->pdata.in2_diff = QUIRK_IN2_DIFF(quirk);