diff options
author | Maximilian Luz <luzmaximilian@gmail.com> | 2021-02-05 02:26:57 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2021-02-08 16:59:21 +0100 |
commit | bd69bcce4aa089435e2891222236b1cb20395bec (patch) | |
tree | 6fde31612ba4b3389c6f765633a384877e09adf3 /drivers/platform/surface/Kconfig | |
parent | platform/x86: intel_scu_wdt: Drop mistakenly added const (diff) | |
download | linux-bd69bcce4aa089435e2891222236b1cb20395bec.tar.xz linux-bd69bcce4aa089435e2891222236b1cb20395bec.zip |
platform/surface: Add Surface Hot-Plug driver
Some Surface Book 2 and 3 models have a discrete GPU (dGPU) that is
hot-pluggable. On those devices, the dGPU is contained in the base,
which can be separated from the tablet part (containing CPU and
touchscreen) while the device is running.
It (in general) is presented as/behaves like a standard PCIe hot-plug
capable device, however, this device can also be put into D3cold. In
D3cold, the device itself is turned off and can thus not submit any
standard PCIe hot-plug events. To properly detect hot-(un)plugging while
the dGPU is in D3cold, out-of-band signaling is required. Without this,
the device state will only get updated during the next bus-check, eg.
via a manually issued lspci call.
This commit adds a driver to handle out-of-band PCIe hot-(un)plug events
on Microsoft Surface devices. On those devices, said events can be
detected via GPIO interrupts, which are then forwarded to the
corresponding ACPI DSM calls by this driver. The DSM then takes care of
issuing the appropriate bus-/device-check, causing the PCI core to
properly pick up the device change.
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/20210205012657.1951753-1-luzmaximilian@gmail.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/surface/Kconfig')
-rw-r--r-- | drivers/platform/surface/Kconfig | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/platform/surface/Kconfig b/drivers/platform/surface/Kconfig index 83b0a4c7b352..0847b2dc97bf 100644 --- a/drivers/platform/surface/Kconfig +++ b/drivers/platform/surface/Kconfig @@ -86,6 +86,25 @@ config SURFACE_GPE accordingly. It is required on those devices to allow wake-ups from suspend by opening the lid. +config SURFACE_HOTPLUG + tristate "Surface Hot-Plug Driver" + depends on GPIOLIB + help + Driver for out-of-band hot-plug event signaling on Microsoft Surface + devices with hot-pluggable PCIe cards. + + This driver is used on Surface Book (2 and 3) devices with a + hot-pluggable discrete GPU (dGPU). When not in use, the dGPU on those + devices can enter D3cold, which prevents in-band (standard) PCIe + hot-plug signaling. Thus, without this driver, detaching the base + containing the dGPU will not correctly update the state of the + corresponding PCIe device if it is in D3cold. This driver adds support + for out-of-band hot-plug notifications, ensuring that the device state + is properly updated even when the device in question is in D3cold. + + Select M or Y here, if you want to (fully) support hot-plugging of + dGPU devices on the Surface Book 2 and/or 3 during D3cold. + config SURFACE_PRO3_BUTTON tristate "Power/home/volume buttons driver for Microsoft Surface Pro 3/4 tablet" depends on INPUT |