Commit 052fd24a authored by Kovács Tamás's avatar Kovács Tamás Committed by Greg Kroah-Hartman

ASoC: Intel: Baytrail: add quirk for Aegex 10 (RU2) tablet

[ Upstream commit 3e951e79 ]

This tablet has an incorrect acpi identifier just like
Thinkpad10 tablet, which is why it is trying to load the RT5640 driver
instead of the RT5762 driver. The RT5640 driver, on the other hand, checks
the hardware ID, so no driver are loaded during boot. This fix resolves to
load the RT5672 driver on this tablet during boot. It also provides the
correct IO configuration, like the jack detect mode 3, for 1.8V pullup. I
would like to thank Pierre-Louis Bossart for helping with this patch.
Signed-off-by: default avatarKovács Tamás <kepszlok@zohomail.eu>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 260381ed
...@@ -2882,6 +2882,18 @@ static const struct dmi_system_id dmi_platform_intel_quirks[] = { ...@@ -2882,6 +2882,18 @@ static const struct dmi_system_id dmi_platform_intel_quirks[] = {
RT5670_DEV_GPIO | RT5670_DEV_GPIO |
RT5670_JD_MODE3), RT5670_JD_MODE3),
}, },
{
.callback = rt5670_quirk_cb,
.ident = "Aegex 10 tablet (RU2)",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "AEGEX"),
DMI_MATCH(DMI_PRODUCT_VERSION, "RU2"),
},
.driver_data = (unsigned long *)(RT5670_DMIC_EN |
RT5670_DMIC2_INR |
RT5670_DEV_GPIO |
RT5670_JD_MODE3),
},
{} {}
}; };
......
...@@ -22,6 +22,7 @@ static unsigned long byt_machine_id; ...@@ -22,6 +22,7 @@ static unsigned long byt_machine_id;
#define BYT_THINKPAD_10 1 #define BYT_THINKPAD_10 1
#define BYT_POV_P1006W 2 #define BYT_POV_P1006W 2
#define BYT_AEGEX_10 3
static int byt_thinkpad10_quirk_cb(const struct dmi_system_id *id) static int byt_thinkpad10_quirk_cb(const struct dmi_system_id *id)
{ {
...@@ -35,6 +36,12 @@ static int byt_pov_p1006w_quirk_cb(const struct dmi_system_id *id) ...@@ -35,6 +36,12 @@ static int byt_pov_p1006w_quirk_cb(const struct dmi_system_id *id)
return 1; return 1;
} }
static int byt_aegex10_quirk_cb(const struct dmi_system_id *id)
{
byt_machine_id = BYT_AEGEX_10;
return 1;
}
static const struct dmi_system_id byt_table[] = { static const struct dmi_system_id byt_table[] = {
{ {
.callback = byt_thinkpad10_quirk_cb, .callback = byt_thinkpad10_quirk_cb,
...@@ -75,9 +82,18 @@ static const struct dmi_system_id byt_table[] = { ...@@ -75,9 +82,18 @@ static const struct dmi_system_id byt_table[] = {
DMI_EXACT_MATCH(DMI_BOARD_NAME, "0E57"), DMI_EXACT_MATCH(DMI_BOARD_NAME, "0E57"),
}, },
}, },
{
/* Aegex 10 tablet (RU2) */
.callback = byt_aegex10_quirk_cb,
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "AEGEX"),
DMI_MATCH(DMI_PRODUCT_VERSION, "RU2"),
},
},
{ } { }
}; };
/* The Thinkapd 10 and Aegex 10 tablets have the same ID problem */
static struct snd_soc_acpi_mach byt_thinkpad_10 = { static struct snd_soc_acpi_mach byt_thinkpad_10 = {
.id = "10EC5640", .id = "10EC5640",
.drv_name = "cht-bsw-rt5672", .drv_name = "cht-bsw-rt5672",
...@@ -104,6 +120,7 @@ static struct snd_soc_acpi_mach *byt_quirk(void *arg) ...@@ -104,6 +120,7 @@ static struct snd_soc_acpi_mach *byt_quirk(void *arg)
switch (byt_machine_id) { switch (byt_machine_id) {
case BYT_THINKPAD_10: case BYT_THINKPAD_10:
case BYT_AEGEX_10:
return &byt_thinkpad_10; return &byt_thinkpad_10;
case BYT_POV_P1006W: case BYT_POV_P1006W:
return &byt_pov_p1006w; return &byt_pov_p1006w;
......
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