Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GPL-2.0+
0002 
0003 .. |san_client_link| replace:: :c:func:`san_client_link`
0004 .. |san_dgpu_notifier_register| replace:: :c:func:`san_dgpu_notifier_register`
0005 .. |san_dgpu_notifier_unregister| replace:: :c:func:`san_dgpu_notifier_unregister`
0006 
0007 ===================
0008 Surface ACPI Notify
0009 ===================
0010 
0011 The Surface ACPI Notify (SAN) device provides the bridge between ACPI and
0012 SAM controller. Specifically, ACPI code can execute requests and handle
0013 battery and thermal events via this interface. In addition to this, events
0014 relating to the discrete GPU (dGPU) of the Surface Book 2 can be sent from
0015 ACPI code (note: the Surface Book 3 uses a different method for this). The
0016 only currently known event sent via this interface is a dGPU power-on
0017 notification. While this driver handles the former part internally, it only
0018 relays the dGPU events to any other driver interested via its public API and
0019 does not handle them.
0020 
0021 The public interface of this driver is split into two parts: Client
0022 registration and notifier-block registration.
0023 
0024 A client to the SAN interface can be linked as consumer to the SAN device
0025 via |san_client_link|. This can be used to ensure that the a client
0026 receiving dGPU events does not miss any events due to the SAN interface not
0027 being set up as this forces the client driver to unbind once the SAN driver
0028 is unbound.
0029 
0030 Notifier-blocks can be registered by any device for as long as the module is
0031 loaded, regardless of being linked as client or not. Registration is done
0032 with |san_dgpu_notifier_register|. If the notifier is not needed any more, it
0033 should be unregistered via |san_dgpu_notifier_unregister|.
0034 
0035 Consult the API documentation below for more details.
0036 
0037 
0038 API Documentation
0039 =================
0040 
0041 .. kernel-doc:: include/linux/surface_acpi_notify.h
0042 
0043 .. kernel-doc:: drivers/platform/surface/surface_acpi_notify.c
0044     :export: