Skip to content
Commit e633f33d authored by Maximilian Luz's avatar Maximilian Luz Committed by Sebastian Reichel
Browse files

power: supply: surface_battery: Fix battery event handling



The battery subsystem of the Surface Aggregator Module EC requires us to
register the battery notifier with instance ID 0. However, battery
events are actually sent with the instance ID corresponding to the
device, which is nonzero. Thus, the strict-matching approach doesn't
work here and will discard events that the driver is expected to handle.

To fix this we have to fall back on notifier matching by target-category
only and have to manually check the instance ID in the notifier
callback.

Fixes: 167f77f7 ("power: supply: Add battery driver for Surface Aggregator Module")
Signed-off-by: default avatarMaximilian Luz <luzmaximilian@gmail.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 6efb943b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment