Patch "ACPI: x86: Add DELL0501 handling to acpi_quirk_skip_serdev_enumeration()" has been added to the 6.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ACPI: x86: Add DELL0501 handling to acpi_quirk_skip_serdev_enumeration()

to the 6.8-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     acpi-x86-add-dell0501-handling-to-acpi_quirk_skip_se.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 877522169dbf76d5aec093fee58ecf835169dd0f
Author: Hans de Goede <hdegoede@xxxxxxxxxx>
Date:   Sun Feb 18 16:15:33 2024 +0100

    ACPI: x86: Add DELL0501 handling to acpi_quirk_skip_serdev_enumeration()
    
    [ Upstream commit 99b572e6136eab69a8c91d72cf8595b256e304b5 ]
    
    Some recent(ish) Dell AIO devices have a backlight controller board
    connected to an UART.
    
    This UART has a DELL0501 HID with CID set to PNP0501 so that the UART is
    still handled by 8250_pnp.c. Unfortunately there is no separate ACPI device
    with an UartSerialBusV2() resource to model the backlight-controller.
    This causes the kernel to create a /dev/ttyS0 char-device for the UART
    instead of creating an in kernel serdev-controller + serdev-device pair
    for a kernel backlight driver.
    
    Use the existing acpi_quirk_skip_serdev_enumeration() mechanism to work
    around this by returning skip=true for tty-ctrl parents with a HID
    of DELL0501.
    
    Like other cases where the UartSerialBusV2() resource is missing or broken
    this will only create the serdev-controller device and the serdev-device
    itself will need to be instantiated by platform code.
    
    Unfortunately in this case there is no device for the platform-code
    instantiating the serdev-device to bind to. So also create
    a platform_device for this.
    
    Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/acpi/x86/utils.c b/drivers/acpi/x86/utils.c
index 8829a907eee02..90c3d2eab9e99 100644
--- a/drivers/acpi/x86/utils.c
+++ b/drivers/acpi/x86/utils.c
@@ -484,8 +484,28 @@ static int acpi_dmi_skip_serdev_enumeration(struct device *controller_parent, bo
 
 int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *skip)
 {
+	struct acpi_device *adev = ACPI_COMPANION(controller_parent);
+
 	*skip = false;
 
+	/*
+	 * The DELL0501 ACPI HID represents an UART (CID is set to PNP0501) with
+	 * a backlight-controller attached. There is no separate ACPI device with
+	 * an UartSerialBusV2() resource to model the backlight-controller.
+	 * Set skip to true so that the tty core creates a serdev ctrl device.
+	 * The backlight driver will manually create the serdev client device.
+	 */
+	if (acpi_dev_hid_match(adev, "DELL0501")) {
+		*skip = true;
+		/*
+		 * Create a platform dev for dell-uart-backlight to bind to.
+		 * This is a static device, so no need to store the result.
+		 */
+		platform_device_register_simple("dell-uart-backlight", PLATFORM_DEVID_NONE,
+						NULL, 0);
+		return 0;
+	}
+
 	return acpi_dmi_skip_serdev_enumeration(controller_parent, skip);
 }
 EXPORT_SYMBOL_GPL(acpi_quirk_skip_serdev_enumeration);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux