mirror_ubuntu-kernels/drivers/platform/surface
Maximilian Luz 5c1e88b98c platform/surface: aggregator: Allow notifiers to avoid communication on unregistering
When SSAM client devices have been (physically) hot-removed,
communication attempts with those devices may fail and time out. This
can even extend to event notifiers, due to which timeouts may occur
during device removal, slowing down that process.

Add a parameter to the notifier unregister function that allows skipping
communication with the EC to prevent this. Furthermore, add wrappers for
registering and unregistering notifiers belonging to SSAM client devices
that automatically check if the device has been marked as hot-removed
and communication should be avoided.

Note that non-SSAM client devices can generally not be hot-removed, so
also add a convenience wrapper for those, defaulting to allow
communication.

Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/20220527023447.2460025-4-luzmaximilian@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2022-06-13 17:25:07 +02:00
..
aggregator platform/surface: aggregator: Allow notifiers to avoid communication on unregistering 2022-06-13 17:25:07 +02:00
Kconfig platform/surface: Remove Surface 3 Button driver 2022-03-02 12:33:00 +01:00
Makefile platform/surface: Remove Surface 3 Button driver 2022-03-02 12:33:00 +01:00
surface3_power.c surface: surface3_power: Fix battery readings on batteries without a serial number 2022-03-02 11:42:36 +01:00
surface3-wmi.c platform/surface: surface3-wmi: Simplify resource management 2022-02-03 11:56:04 +01:00
surface_acpi_notify.c platform/surface: Replace acpi_bus_get_device() 2022-02-03 11:56:01 +01:00
surface_aggregator_cdev.c platform/surface: aggregator_cdev: Add lockdep support 2021-06-16 17:47:53 +02:00
surface_aggregator_registry.c platform/surface: aggregator_registry: Rename device registration function 2021-11-16 10:56:54 +01:00
surface_dtx.c platform/surface: dtx: Add missing mutex_destroy() call in failure path 2021-06-16 17:47:52 +02:00
surface_gpe.c platform/surface: gpe: Add support for Surface Pro 8 2022-05-06 13:05:57 +02:00
surface_hotplug.c platform/surface: Add Surface Hot-Plug driver 2021-02-08 16:59:21 +01:00
surface_platform_profile.c platform/surface: aggregator: Make SSAM_DEFINE_SYNC_REQUEST_x define static functions 2021-03-08 11:33:28 +01:00
surfacepro3_button.c platform: x86: ACPI: Get rid of ACPICA message printing 2021-03-08 11:33:39 +01:00