power: supply: surface_battery: handle battery event 0x1a
PATCH 1/1 power: supply: surface_battery: handle battery event 0x1a
On the Microsoft Surface Pro 11 (Snapdragon X Elite / X1E80100), the Surface Aggregator Module (SAM) emits battery target category (0x02) event CID 0x1a alongside standard battery status notifications. Because CID 0x1a is currently unhandled in spwr_battery_event(), surface_battery logs:
surface_battery: unhandled battery event (cid = 0x1a)
Add SAM_EVENT_CID_BAT_0x1A (0x1a) and trigger a battery status recheck via spwr_battery_recheck_full(), matching the existing battery state events.
--- drivers/power/supply/surface_battery.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/power/supply/surface_battery.c +2 -0
@@ -26,6 +26,7 @@ enum sam_event_cid_bat {SAM_EVENT_CID_BAT_BST =0x16 ,SAM_EVENT_CID_BAT_ADP =0x17 ,SAM_EVENT_CID_BAT_PROT =0x18 , + SAM_EVENT_CID_BAT_0x1A =0x1a , SAM_EVENT_CID_BAT_DPTF = 0x53, };
@@ -368,6 +369,7 @@ static u32 spwr_notify_bat(struct ssam_event_notifier *nf, const struct ssam_evebreak ;case SAM_EVENT_CID_BAT_PROT : +case SAM_EVENT_CID_BAT_0x1A:/* * TODO: Implement support for battery protection status change * event.
Signature · 1 line
2.56.0
Maximilian Luz
maintainerAm 23.10.2026 um 19:32 schrieb Ramón Jesús Miranda:
Quoted 21 lines
On the Microsoft Surface Pro 11 (Snapdragon X Elite / X1E80100), the Surface Aggregator Module (SAM) emits battery target category (
0x02) event CID0x1aalongside standard battery status notifications. Because CID0x1ais currently unhandled inspwr_battery_event(),surface_batterylogs:surface_battery: unhandled battery event (cid = 0x1a)Add
SAM_EVENT_CID_BAT_0x1A(0x1a) and trigger a battery status recheck viaspwr_battery_recheck_full(), matching the existing battery state events.Assisted-by Antigravity:gemini-2.5-proSigned-off-by Ramón Jesús Miranda <[email protected]>--- drivers/power/supply/surface_battery.c | 2 ++ 1 file changed, 2 insertions(+)drivers/power/supply/surface_battery.c +0
-0
drivers/power/supply/surface_battery.c enum sam_event_cid_bat { · line 29
Quoted 4 lines
drivers/power/supply/surface_battery.c +1
-0@@ -26,6 +26,7 @@ enum sam_event_cid_bat {SAM_EVENT_CID_BAT_BST =0x16 ,SAM_EVENT_CID_BAT_ADP =0x17 ,SAM_EVENT_CID_BAT_PROT =0x18 , + SAM_EVENT_CID_BAT_0x1A = 0x1a,
I don't particularly like it being named 0x1A. Do we know what exactly triggers this event?
Best,
Max
Quoted 11 lines
drivers/power/supply/surface_battery.c +1
-0SAM_EVENT_CID_BAT_DPTF = 0x53, };@@ -368,6 +369,7 @@ static u32 spwr_notify_bat(struct ssam_event_notifier *nf, const struct ssam_evebreak ;case SAM_EVENT_CID_BAT_PROT : +case SAM_EVENT_CID_BAT_0x1A:/* * TODO: Implement support for battery protection status change * event.