Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

platform/surface: aggregator_registry: Add battery subsystem devices

Add battery subsystem (TC=0x02) devices (battery and AC) to the SSAM
device registry. These devices need to be registered for 7th-generation
Surface models. On 5th- and 6th-generation models, these devices are
handled via the standard ACPI battery/AC interface, which in turn
accesses the same SSAM interface via the Surface ACPI Notify (SAN)
driver.

Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/20210212115439.1525216-4-luzmaximilian@gmail.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

authored by

Maximilian Luz and committed by
Hans de Goede
17590927 797e7856

+27
+27
drivers/platform/surface/surface_aggregator_registry.c
··· 47 47 .parent = &ssam_node_root, 48 48 }; 49 49 50 + /* AC adapter. */ 51 + static const struct software_node ssam_node_bat_ac = { 52 + .name = "ssam:01:02:01:01:01", 53 + .parent = &ssam_node_root, 54 + }; 55 + 56 + /* Primary battery. */ 57 + static const struct software_node ssam_node_bat_main = { 58 + .name = "ssam:01:02:01:01:00", 59 + .parent = &ssam_node_root, 60 + }; 61 + 62 + /* Secondary battery (Surface Book 3). */ 63 + static const struct software_node ssam_node_bat_sb3base = { 64 + .name = "ssam:01:02:02:01:00", 65 + .parent = &ssam_node_hub_base, 66 + }; 67 + 50 68 /* Devices for Surface Book 2. */ 51 69 static const struct software_node *ssam_node_group_sb2[] = { 52 70 &ssam_node_root, ··· 75 57 static const struct software_node *ssam_node_group_sb3[] = { 76 58 &ssam_node_root, 77 59 &ssam_node_hub_base, 60 + &ssam_node_bat_ac, 61 + &ssam_node_bat_main, 62 + &ssam_node_bat_sb3base, 78 63 NULL, 79 64 }; 80 65 ··· 96 75 /* Devices for Surface Laptop 3. */ 97 76 static const struct software_node *ssam_node_group_sl3[] = { 98 77 &ssam_node_root, 78 + &ssam_node_bat_ac, 79 + &ssam_node_bat_main, 99 80 NULL, 100 81 }; 101 82 102 83 /* Devices for Surface Laptop Go. */ 103 84 static const struct software_node *ssam_node_group_slg1[] = { 104 85 &ssam_node_root, 86 + &ssam_node_bat_ac, 87 + &ssam_node_bat_main, 105 88 NULL, 106 89 }; 107 90 ··· 124 99 /* Devices for Surface Pro 7. */ 125 100 static const struct software_node *ssam_node_group_sp7[] = { 126 101 &ssam_node_root, 102 + &ssam_node_bat_ac, 103 + &ssam_node_bat_main, 127 104 NULL, 128 105 }; 129 106