0012-misc-fixes.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. From 7f6b73f659673d6bb91d148354c96d47a5b25af5 Mon Sep 17 00:00:00 2001
  2. From: Maximilian Luz <luzmaximilian@gmail.com>
  3. Date: Wed, 8 Dec 2021 16:22:50 +0100
  4. Subject: [PATCH] acpi/battery: Add device HID and quirk for Microsoft Surface
  5. Go 3
  6. For some reason, the Microsoft Surface Go 3 uses the standard ACPI
  7. interface for battery information, but does not use the standard PNP0C0A
  8. HID. Instead it uses MSHW0146 as identifier. Add that ID to the driver
  9. as this seems to work well.
  10. Additionally, the power state is not updated immediately after the AC
  11. has been (un-)plugged, so add the respective quirk for that.
  12. Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
  13. Patchset: misc-fixes
  14. ---
  15. drivers/acpi/battery.c | 12 ++++++++++++
  16. 1 file changed, 12 insertions(+)
  17. diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
  18. index 8afa85d6eb6a..65882cb791a5 100644
  19. --- a/drivers/acpi/battery.c
  20. +++ b/drivers/acpi/battery.c
  21. @@ -59,6 +59,10 @@ MODULE_PARM_DESC(cache_time, "cache time in milliseconds");
  22. static const struct acpi_device_id battery_device_ids[] = {
  23. {"PNP0C0A", 0},
  24. +
  25. + /* Microsoft Surface Go 3 */
  26. + {"MSHW0146", 0},
  27. +
  28. {"", 0},
  29. };
  30. @@ -1155,6 +1159,14 @@ static const struct dmi_system_id bat_dmi_table[] __initconst = {
  31. DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo MIIX 320-10ICR"),
  32. },
  33. },
  34. + {
  35. + /* Microsoft Surface Go 3 */
  36. + .callback = battery_notification_delay_quirk,
  37. + .matches = {
  38. + DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
  39. + DMI_MATCH(DMI_PRODUCT_NAME, "Surface Go 3"),
  40. + },
  41. + },
  42. {},
  43. };
  44. --
  45. 2.34.1