]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.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)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 29 Jun 2017 13:39:58 +0000 (08:39 -0500)
commit483f05b4887722fd084c4e27aeeb03039b752c9b
tree5786abcfeffbd915e92c9cc14a8a604faa08119a
parenta4d8934be983f88633795f669558b244b73c6648
ACPI / scan: Fix enumeration for special SPI and I2C devices

BugLink: http://bugs.launchpad.net/bugs/1701269
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>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/acpi/scan.c
include/acpi/acpi_bus.h