i2c / ACPI: Rework I2C device scanning
authorMika Westerberg <mika.westerberg@linux.intel.com>
Wed, 7 Oct 2015 10:18:44 +0000 (13:18 +0300)
committerWolfram Sang <wsa@the-dreams.de>
Tue, 20 Oct 2015 14:51:14 +0000 (16:51 +0200)
commit166c2ba398640278ae6037be4aa5562c03cf3d24
tree7227b55c3f29e90f26d4b6f7daf279cf65a0389a
parentd80d134182ba536ececab8d5fca50d779befc9a6
i2c / ACPI: Rework I2C device scanning

The way we currently scan I2C devices behind an I2C host controller does not
work in cases where the I2C device in question is not declared directly below
the host controller ACPI node.

This is perfectly legal according the ACPI 6.0 specification and some existing
systems are doing this.

To be able to enumerate all devices which are connected to a certain I2C host
controller we need to rework the current I2C scanning routine a bit. Instead of
scanning directly below the host controller we scan the whole ACPI namespace
for present devices with valid I2cSerialBus() connection pointing to the host
controller in question.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Dustin Byford <dustin@cumulusnetworks.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/i2c-core.c