i2c: add ACPI support for I2C mux ports
authorDustin Byford <dustin@cumulusnetworks.com>
Fri, 23 Oct 2015 19:27:07 +0000 (12:27 -0700)
committerWolfram Sang <wsa@the-dreams.de>
Sun, 25 Oct 2015 14:49:46 +0000 (15:49 +0100)
commit8eb5c87a92c065aaca39ac3e841b07906a4959a2
tree326cf581c599660996c4ddb59a5ffc6898ad0ebd
parentc0e5c4450494d74c8deb4f47ddcbb74c94937e20
i2c: add ACPI support for I2C mux ports

Although I2C mux devices are easily enumerated using ACPI (_HID/_CID or
device property compatible string match), enumerating I2C client devices
connected through an I2C mux needs a little extra work.

This change implements a method for describing an I2C device hierarchy that
includes mux devices by using an ACPI Device() for each mux channel along
with an _ADR to set the channel number for the device.  See
Documentation/acpi/i2c-muxes.txt for a simple example.

To make this work the ismt, i801, and designware pci/platform devs now
share an ACPI companion with their I2C adapter dev similar to how it's done
in OF.  This is done on the assumption that power management functions will
not be called directly on the I2C dev that is sharing the ACPI node.

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Dustin Byford <dustin@cumulusnetworks.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Documentation/acpi/i2c-muxes.txt [new file with mode: 0644]
drivers/i2c/busses/i2c-designware-pcidrv.c
drivers/i2c/busses/i2c-designware-platdrv.c
drivers/i2c/busses/i2c-i801.c
drivers/i2c/busses/i2c-ismt.c
drivers/i2c/i2c-core.c
drivers/i2c/i2c-mux.c