]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ACPI / scan: Fix enumeration for special SPI and I2C devices
authorJarkko Nikula <jarkko.nikula@linux.intel.com>
Mon, 19 Jun 2017 12:53:01 +0000 (15:53 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Jun 2017 11:02:54 +0000 (13:02 +0200)
commit017294bd93f4c1b3fcd004483195c88cb0f7794e
tree5b44b75e331546310d017f83406ea6490b3a4cf1
parent3645b8f1fb789a9f5f149e064c32e08124467e15
ACPI / scan: Fix enumeration for special SPI and I2C devices

commit e4330d8bf669139a983255d1801733b64c2ae841 upstream.

Commit f406270bf73d ("ACPI / scan: Set the visited flag for all
enumerated devices") caused that two group of special SPI or I2C
devices do not enumerate. SPI and I2C devices are expected to be
enumerated by the SPI and I2C subsystems but change caused that
acpi_bus_attach() marks those devices with acpi_device_set_enumerated().

First group of devices are matched using Device Tree compatible property
with special _HID "PRP0001". Those devices have matched scan handler,
acpi_scan_attach_handler() retuns 1 and acpi_bus_attach() marks them
with acpi_device_set_enumerated().

Second group of devices without valid _HID such as "LNXVIDEO" have
device->pnp.type.platform_id set to zero and change again marks them
with acpi_device_set_enumerated().

Fix this by flagging the SPI and I2C devices during struct acpi_device
object initialization time and let the code in acpi_bus_attach() to go
through the device_attach() and acpi_default_enumeration() path for all
SPI and I2C devices.

Fixes: f406270bf73d (ACPI / scan: Set the visited flag for all enumerated devices)
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/scan.c
include/acpi/acpi_bus.h