summarylogtreecommitdiffstats
path: root/0022-HID-AMD_SFH-Add-a-DMI-quirk-entry-for-Chromebooks.patch
diff options
context:
space:
mode:
Diffstat (limited to '0022-HID-AMD_SFH-Add-a-DMI-quirk-entry-for-Chromebooks.patch')
-rw-r--r--0022-HID-AMD_SFH-Add-a-DMI-quirk-entry-for-Chromebooks.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/0022-HID-AMD_SFH-Add-a-DMI-quirk-entry-for-Chromebooks.patch b/0022-HID-AMD_SFH-Add-a-DMI-quirk-entry-for-Chromebooks.patch
new file mode 100644
index 000000000000..0b803b318e36
--- /dev/null
+++ b/0022-HID-AMD_SFH-Add-a-DMI-quirk-entry-for-Chromebooks.patch
@@ -0,0 +1,60 @@
+From 2803225ac89bc761ade8673105db8a8d84335054 Mon Sep 17 00:00:00 2001
+From: Akihiko Odaki <akihiko.odaki@gmail.com>
+Date: Tue, 16 Aug 2022 19:21:20 +0900
+Subject: [PATCH 22/73] HID: AMD_SFH: Add a DMI quirk entry for Chromebooks
+
+commit adada3f4930ac084740ea340bd8e94028eba4f22 upstream.
+
+Google Chromebooks use Chrome OS Embedded Controller Sensor Hub instead
+of Sensor Hub Fusion and leaves MP2 uninitialized, which disables all
+functionalities, even including the registers necessary for feature
+detections.
+
+The behavior was observed with Lenovo ThinkPad C13 Yoga.
+
+Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
+Suggested-by: Mario Limonciello <mario.limonciello@amd.com>
+Acked-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
+index 1441787a154a..9b97dc0695e3 100644
+--- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
++++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
+@@ -285,11 +285,29 @@ static int amd_sfh_irq_init(struct amd_mp2_dev *privdata)
+ return 0;
+ }
+
++static const struct dmi_system_id dmi_nodevs[] = {
++ {
++ /*
++ * Google Chromebooks use Chrome OS Embedded Controller Sensor
++ * Hub instead of Sensor Hub Fusion and leaves MP2
++ * uninitialized, which disables all functionalities, even
++ * including the registers necessary for feature detections.
++ */
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "Google"),
++ },
++ },
++ { }
++};
++
+ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
+ {
+ struct amd_mp2_dev *privdata;
+ int rc;
+
++ if (dmi_first_match(dmi_nodevs))
++ return -ENODEV;
++
+ privdata = devm_kzalloc(&pdev->dev, sizeof(*privdata), GFP_KERNEL);
+ if (!privdata)
+ return -ENOMEM;
+--
+2.37.3
+