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);