Commit e7394c77 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'pm+acpi-3.19-fin' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI power management fix from Rafael  Wysocki:
 "This is a revert of an ACPI Low-power Subsystem (LPSS) driver change
  that was supposed to improve power management of the LPSS DMA
  controller, but introduced more serious problems.

  Since fixing them turns out to be non-trivial, it is better to revert
  the commit in question at this point and try to fix the original issue
  differently in the next cycle"

* tag 'pm+acpi-3.19-fin' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  Revert "ACPI / LPSS: introduce a 'proxy' device to power on LPSS for DMA"
parents f3c2352d 3df2da96
/* /*
* ACPI support for Intel Lynxpoint LPSS. * ACPI support for Intel Lynxpoint LPSS.
* *
* Copyright (C) 2013, 2014, Intel Corporation * Copyright (C) 2013, Intel Corporation
* Authors: Mika Westerberg <mika.westerberg@linux.intel.com> * Authors: Mika Westerberg <mika.westerberg@linux.intel.com>
* Rafael J. Wysocki <rafael.j.wysocki@intel.com> * Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* *
...@@ -60,8 +60,6 @@ ACPI_MODULE_NAME("acpi_lpss"); ...@@ -60,8 +60,6 @@ ACPI_MODULE_NAME("acpi_lpss");
#define LPSS_CLK_DIVIDER BIT(2) #define LPSS_CLK_DIVIDER BIT(2)
#define LPSS_LTR BIT(3) #define LPSS_LTR BIT(3)
#define LPSS_SAVE_CTX BIT(4) #define LPSS_SAVE_CTX BIT(4)
#define LPSS_DEV_PROXY BIT(5)
#define LPSS_PROXY_REQ BIT(6)
struct lpss_private_data; struct lpss_private_data;
...@@ -72,10 +70,8 @@ struct lpss_device_desc { ...@@ -72,10 +70,8 @@ struct lpss_device_desc {
void (*setup)(struct lpss_private_data *pdata); void (*setup)(struct lpss_private_data *pdata);
}; };
static struct device *proxy_device;
static struct lpss_device_desc lpss_dma_desc = { static struct lpss_device_desc lpss_dma_desc = {
.flags = LPSS_CLK | LPSS_PROXY_REQ, .flags = LPSS_CLK,
}; };
struct lpss_private_data { struct lpss_private_data {
...@@ -150,24 +146,22 @@ static struct lpss_device_desc byt_pwm_dev_desc = { ...@@ -150,24 +146,22 @@ static struct lpss_device_desc byt_pwm_dev_desc = {
}; };
static struct lpss_device_desc byt_uart_dev_desc = { static struct lpss_device_desc byt_uart_dev_desc = {
.flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX | .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX,
LPSS_DEV_PROXY,
.prv_offset = 0x800, .prv_offset = 0x800,
.setup = lpss_uart_setup, .setup = lpss_uart_setup,
}; };
static struct lpss_device_desc byt_spi_dev_desc = { static struct lpss_device_desc byt_spi_dev_desc = {
.flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX | .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX,
LPSS_DEV_PROXY,
.prv_offset = 0x400, .prv_offset = 0x400,
}; };
static struct lpss_device_desc byt_sdio_dev_desc = { static struct lpss_device_desc byt_sdio_dev_desc = {
.flags = LPSS_CLK | LPSS_DEV_PROXY, .flags = LPSS_CLK,
}; };
static struct lpss_device_desc byt_i2c_dev_desc = { static struct lpss_device_desc byt_i2c_dev_desc = {
.flags = LPSS_CLK | LPSS_SAVE_CTX | LPSS_DEV_PROXY, .flags = LPSS_CLK | LPSS_SAVE_CTX,
.prv_offset = 0x800, .prv_offset = 0x800,
.setup = byt_i2c_setup, .setup = byt_i2c_setup,
}; };
...@@ -374,8 +368,6 @@ static int acpi_lpss_create_device(struct acpi_device *adev, ...@@ -374,8 +368,6 @@ static int acpi_lpss_create_device(struct acpi_device *adev,
adev->driver_data = pdata; adev->driver_data = pdata;
pdev = acpi_create_platform_device(adev); pdev = acpi_create_platform_device(adev);
if (!IS_ERR_OR_NULL(pdev)) { if (!IS_ERR_OR_NULL(pdev)) {
if (!proxy_device && dev_desc->flags & LPSS_DEV_PROXY)
proxy_device = &pdev->dev;
return 1; return 1;
} }
...@@ -600,14 +592,7 @@ static int acpi_lpss_runtime_suspend(struct device *dev) ...@@ -600,14 +592,7 @@ static int acpi_lpss_runtime_suspend(struct device *dev)
if (pdata->dev_desc->flags & LPSS_SAVE_CTX) if (pdata->dev_desc->flags & LPSS_SAVE_CTX)
acpi_lpss_save_ctx(dev, pdata); acpi_lpss_save_ctx(dev, pdata);
ret = acpi_dev_runtime_suspend(dev); return acpi_dev_runtime_suspend(dev);
if (ret)
return ret;
if (pdata->dev_desc->flags & LPSS_PROXY_REQ && proxy_device)
return pm_runtime_put_sync_suspend(proxy_device);
return 0;
} }
static int acpi_lpss_runtime_resume(struct device *dev) static int acpi_lpss_runtime_resume(struct device *dev)
...@@ -615,12 +600,6 @@ static int acpi_lpss_runtime_resume(struct device *dev) ...@@ -615,12 +600,6 @@ static int acpi_lpss_runtime_resume(struct device *dev)
struct lpss_private_data *pdata = acpi_driver_data(ACPI_COMPANION(dev)); struct lpss_private_data *pdata = acpi_driver_data(ACPI_COMPANION(dev));
int ret; int ret;
if (pdata->dev_desc->flags & LPSS_PROXY_REQ && proxy_device) {
ret = pm_runtime_get_sync(proxy_device);
if (ret)
return ret;
}
ret = acpi_dev_runtime_resume(dev); ret = acpi_dev_runtime_resume(dev);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment