0006-surface-sam.patch 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. From b2410ae9e9ca2afe84e15b24625ba80a47c4b796 Mon Sep 17 00:00:00 2001
  2. From: Maximilian Luz <luzmaximilian@gmail.com>
  3. Date: Sun, 22 Oct 2023 14:57:11 +0200
  4. Subject: [PATCH] platform/surface: aggregator_registry: Add support for
  5. Surface Laptop Go 3
  6. Add SAM client device nodes for the Surface Laptop Go 3. It seems to use
  7. the same SAM client devices as the Surface Laptop Go 1 and 2, so re-use
  8. their node group.
  9. Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
  10. Patchset: surface-sam
  11. ---
  12. drivers/platform/surface/surface_aggregator_registry.c | 3 +++
  13. 1 file changed, 3 insertions(+)
  14. diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c
  15. index 0fe5be539652..0d8c8395c588 100644
  16. --- a/drivers/platform/surface/surface_aggregator_registry.c
  17. +++ b/drivers/platform/surface/surface_aggregator_registry.c
  18. @@ -367,6 +367,9 @@ static const struct acpi_device_id ssam_platform_hub_match[] = {
  19. /* Surface Laptop Go 2 */
  20. { "MSHW0290", (unsigned long)ssam_node_group_slg1 },
  21. + /* Surface Laptop Go 3 */
  22. + { "MSHW0440", (unsigned long)ssam_node_group_slg1 },
  23. +
  24. /* Surface Laptop Studio */
  25. { "MSHW0123", (unsigned long)ssam_node_group_sls },
  26. --
  27. 2.43.0
  28. From 3b9a104c60cc7e6626e0adcf8ee5b8219194e41d Mon Sep 17 00:00:00 2001
  29. From: Maximilian Luz <luzmaximilian@gmail.com>
  30. Date: Mon, 20 Nov 2023 19:47:00 +0100
  31. Subject: [PATCH] platform/surface: aggregator_registry: Add support for
  32. Surface Laptop Studio 2
  33. Add SAM client device nodes for the Surface Laptop Studio 2 (SLS2). The
  34. SLS2 is quite similar to the SLS1, but it does not provide the touchpad
  35. as a SAM-HID device. Therefore, add a new node group for the SLS2 and
  36. update the comments accordingly
  37. Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
  38. Patchset: surface-sam
  39. ---
  40. .../surface/surface_aggregator_registry.c | 25 ++++++++++++++++---
  41. 1 file changed, 21 insertions(+), 4 deletions(-)
  42. diff --git a/drivers/platform/surface/surface_aggregator_registry.c b/drivers/platform/surface/surface_aggregator_registry.c
  43. index 0d8c8395c588..530db4db71ab 100644
  44. --- a/drivers/platform/surface/surface_aggregator_registry.c
  45. +++ b/drivers/platform/surface/surface_aggregator_registry.c
  46. @@ -247,8 +247,8 @@ static const struct software_node *ssam_node_group_sl5[] = {
  47. NULL,
  48. };
  49. -/* Devices for Surface Laptop Studio. */
  50. -static const struct software_node *ssam_node_group_sls[] = {
  51. +/* Devices for Surface Laptop Studio 1. */
  52. +static const struct software_node *ssam_node_group_sls1[] = {
  53. &ssam_node_root,
  54. &ssam_node_bat_ac,
  55. &ssam_node_bat_main,
  56. @@ -263,6 +263,20 @@ static const struct software_node *ssam_node_group_sls[] = {
  57. NULL,
  58. };
  59. +/* Devices for Surface Laptop Studio 2. */
  60. +static const struct software_node *ssam_node_group_sls2[] = {
  61. + &ssam_node_root,
  62. + &ssam_node_bat_ac,
  63. + &ssam_node_bat_main,
  64. + &ssam_node_tmp_pprof,
  65. + &ssam_node_pos_tablet_switch,
  66. + &ssam_node_hid_sam_keyboard,
  67. + &ssam_node_hid_sam_penstash,
  68. + &ssam_node_hid_sam_sensors,
  69. + &ssam_node_hid_sam_ucm_ucsi,
  70. + NULL,
  71. +};
  72. +
  73. /* Devices for Surface Laptop Go. */
  74. static const struct software_node *ssam_node_group_slg1[] = {
  75. &ssam_node_root,
  76. @@ -370,8 +384,11 @@ static const struct acpi_device_id ssam_platform_hub_match[] = {
  77. /* Surface Laptop Go 3 */
  78. { "MSHW0440", (unsigned long)ssam_node_group_slg1 },
  79. - /* Surface Laptop Studio */
  80. - { "MSHW0123", (unsigned long)ssam_node_group_sls },
  81. + /* Surface Laptop Studio 1 */
  82. + { "MSHW0123", (unsigned long)ssam_node_group_sls1 },
  83. +
  84. + /* Surface Laptop Studio 2 */
  85. + { "MSHW0360", (unsigned long)ssam_node_group_sls2 },
  86. { },
  87. };
  88. --
  89. 2.43.0