i2c: attach/detach I2C client device to the ACPI power domain
commita76e9bd89ae70fdfff5fd1ca47756a35d10c5f3f
authorLv Zheng <lv.zheng@intel.com>
Thu, 10 Oct 2013 10:28:47 +0000 (10 13:28 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 11 Oct 2013 00:23:14 +0000 (11 02:23 +0200)
treeb6bfe78690931cf6c105841d6d622d405653688d
parent644f17ad7fc12768cd619532383343e514eab2ac
i2c: attach/detach I2C client device to the ACPI power domain

If the I2C client device is enumerated from ACPI namespace it might have
ACPI methods that needs to be called in order to transition the device to
different power states (such as _PSx).

Implement this for I2C client devices by checking if the device has an ACPI
handle and if that's the case, attach it to the ACPI power domain. In
addition we make sure that the device is fully powered when its ->probe()
function gets called.

For non-ACPI devices this patch is a no-op.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/i2c/i2c-core.c