]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: attach/detach I2C client device to the ACPI power domain
authorLv Zheng <lv.zheng@intel.com>
Thu, 10 Oct 2013 10:28:47 +0000 (13:28 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 11 Oct 2013 00:23:14 +0000 (02:23 +0200)
commit3bd4b8c9df1f09266ba892d6db9fd9507df8a877
treeb6bfe78690931cf6c105841d6d622d405653688d
parent02318ab991aa30235223b24a9b8eb9cf2d8df3dc
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