Skip to content

Commit 97e443f

Browse files
kitakar5525qzed
authored andcommitted
(surface3-oemb) add DMI matches for Surface 3 with broken DMI table
On some Surface 3, the DMI table gets corrupted for unknown reasons and breaks existing DMI matching used for device-specific quirks. This commit adds the (broken) DMI data into dmi_system_id tables used for quirks so that each driver can enable quirks even on the affected systems. On affected systems, DMI data will look like this: $ grep . /sys/devices/virtual/dmi/id/{bios_vendor,board_name,board_vendor,\ chassis_vendor,product_name,sys_vendor} /sys/devices/virtual/dmi/id/bios_vendor:American Megatrends Inc. /sys/devices/virtual/dmi/id/board_name:OEMB /sys/devices/virtual/dmi/id/board_vendor:OEMB /sys/devices/virtual/dmi/id/chassis_vendor:OEMB /sys/devices/virtual/dmi/id/product_name:OEMB /sys/devices/virtual/dmi/id/sys_vendor:OEMB Expected: $ grep . /sys/devices/virtual/dmi/id/{bios_vendor,board_name,board_vendor,\ chassis_vendor,product_name,sys_vendor} /sys/devices/virtual/dmi/id/bios_vendor:American Megatrends Inc. /sys/devices/virtual/dmi/id/board_name:Surface 3 /sys/devices/virtual/dmi/id/board_vendor:Microsoft Corporation /sys/devices/virtual/dmi/id/chassis_vendor:Microsoft Corporation /sys/devices/virtual/dmi/id/product_name:Surface 3 /sys/devices/virtual/dmi/id/sys_vendor:Microsoft Corporation Signed-off-by: Tsuchiya Yuto <[email protected]> Patchset: surface3
1 parent 4c1408f commit 97e443f

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

drivers/platform/surface/surface3-wmi.c

+7
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ static const struct dmi_system_id surface3_dmi_table[] = {
3737
DMI_MATCH(DMI_PRODUCT_NAME, "Surface 3"),
3838
},
3939
},
40+
{
41+
.matches = {
42+
DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
43+
DMI_MATCH(DMI_SYS_VENDOR, "OEMB"),
44+
DMI_MATCH(DMI_PRODUCT_NAME, "OEMB"),
45+
},
46+
},
4047
#endif
4148
{ }
4249
};

sound/soc/codecs/rt5645.c

+9
Original file line numberDiff line numberDiff line change
@@ -3790,6 +3790,15 @@ static const struct dmi_system_id dmi_platform_data[] = {
37903790
},
37913791
.driver_data = (void *)&intel_braswell_platform_data,
37923792
},
3793+
{
3794+
.ident = "Microsoft Surface 3",
3795+
.matches = {
3796+
DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
3797+
DMI_MATCH(DMI_SYS_VENDOR, "OEMB"),
3798+
DMI_MATCH(DMI_PRODUCT_NAME, "OEMB"),
3799+
},
3800+
.driver_data = (void *)&intel_braswell_platform_data,
3801+
},
37933802
{
37943803
/*
37953804
* Match for the GPDwin which unfortunately uses somewhat

sound/soc/intel/common/soc-acpi-intel-cht-match.c

+8
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ static const struct dmi_system_id cht_table[] = {
2727
DMI_MATCH(DMI_PRODUCT_NAME, "Surface 3"),
2828
},
2929
},
30+
{
31+
.callback = cht_surface_quirk_cb,
32+
.matches = {
33+
DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
34+
DMI_MATCH(DMI_SYS_VENDOR, "OEMB"),
35+
DMI_MATCH(DMI_PRODUCT_NAME, "OEMB"),
36+
},
37+
},
3038
{ }
3139
};
3240

0 commit comments

Comments
 (0)