]> git.itanic.dy.fi Git - linux-stable/commitdiff
ACPI: scan: Add LNXVIDEO HID to ignore_serial_bus_ids[]
authorHans de Goede <hdegoede@redhat.com>
Sat, 4 Nov 2023 20:58:25 +0000 (21:58 +0100)
committerHans de Goede <hdegoede@redhat.com>
Mon, 20 Nov 2023 12:20:33 +0000 (13:20 +0100)
The I2C-core already has filtering to skip i2c_client instantiation for
LNXVIDEO acpi_device-s with I2cSerialBus resources, since LNXVIDEO devices
are not i2c_client-s and are handled by the acpi_video driver.

This filtering was added to i2c-core-acpi.c in commit 3a4991a9864c ("i2c:
acpi: Do not create i2c-clients for LNXVIDEO ACPI devices").

Now a similar problem has shown up where the SPI-core is instantiating
an unwanted SPI-device for a SpiSerialBus resource under a LNXVIDEO
acpi_device. On a Lenovo Yoga Tab 3 YT3-X90F this unwanted SPI-device
instanstantiation causes the SPI-device instanstantiation for the WM5102
audio codec to fail with:

[   21.988441] pxa2xx-spi 8086228E:00: chipselect 0 already in use

Instead of duplicating the I2C-core filtering in the SPI-core code, push
the filtering of SerialBus resources under LNXVIDEO acpi_device-s up into
the ACPI-core by adding the LNXVIDEO HID to ignore_serial_bus_ids[].

Note the filtering in the I2C-core i2c_acpi_do_lookup() function is still
necessary because this not only impacts i2c_client instantiation but it
also makes the I2C-core ignore the I2cSerialBus resource when checking what
the maximum speed is the I2C bus supports, which is still necessary.

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20231104205828.63139-1-hdegoede@redhat.com
drivers/acpi/scan.c

index fa5dd71a80fad9e7ff14bed6fca5485be6a41542..46a9238c72c6f42767ff521ba0e87b0759566877 100644 (file)
@@ -1727,6 +1727,7 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
         * Some ACPI devs contain SerialBus resources even though they are not
         * attached to a serial bus at all.
         */
+               {ACPI_VIDEO_HID, },
                {"MSHW0028", },
        /*
         * HIDs of device with an UartSerialBusV2 resource for which userspace