]> git.baikalelectronics.ru Git - kernel.git/commit
spi: attach/detach SPI device to the ACPI power domain
authorMika Westerberg <mika.westerberg@linux.intel.com>
Thu, 10 Oct 2013 10:28:48 +0000 (13:28 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 11 Oct 2013 00:23:14 +0000 (02:23 +0200)
commit20cc81b567e60430b00078def5f7364ea5dd5a21
tree9099e5cc31154c90472b2afbeaf72e3df786d309
parent3bd4b8c9df1f09266ba892d6db9fd9507df8a877
spi: attach/detach SPI device to the ACPI power domain

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

We follow what has been done for platform and I2C buses here and attach the
SPI device to the ACPI power domain if the device has an ACPI handle. This
makes sure that the device is powered on when its ->probe() is called.

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

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/spi/spi.c