]> git.baikalelectronics.ru Git - 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)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 21 Jun 2017 21:14:55 +0000 (23:14 +0200)
commit9cabbcc18642d13c52e74a896daec2e58690658e
treeb471fa35f0548700aa201d99edc67b63b26acfc7
parent9e5f96e5ce55869ecb96f5ab5970aed3080c8ae8
ACPI / scan: Fix enumeration for special SPI and I2C devices

Commit 528a4fbcef01 ("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: 528a4fbcef01 (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>
Cc: 4.11+ <stable@vger.kernel.org> # 4.11+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/scan.c
include/acpi/acpi_bus.h