aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpi_lpss.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpi_lpss.c')
-rw-r--r--drivers/acpi/acpi_lpss.c28
1 files changed, 22 insertions, 6 deletions
diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
index ce06149088c5..b0ea767c8696 100644
--- a/drivers/acpi/acpi_lpss.c
+++ b/drivers/acpi/acpi_lpss.c
@@ -196,6 +196,17 @@ static struct lpss_device_desc byt_i2c_dev_desc = {
196 .setup = lpss_i2c_setup, 196 .setup = lpss_i2c_setup,
197}; 197};
198 198
199static struct lpss_shared_clock bsw_pwm_clock = {
200 .name = "pwm_clk",
201 .rate = 19200000,
202};
203
204static struct lpss_device_desc bsw_pwm_dev_desc = {
205 .clk_required = true,
206 .save_ctx = true,
207 .shared_clock = &bsw_pwm_clock,
208};
209
199#else 210#else
200 211
201#define LPSS_ADDR(desc) (0UL) 212#define LPSS_ADDR(desc) (0UL)
@@ -225,6 +236,12 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = {
225 { "INT33B2", }, 236 { "INT33B2", },
226 { "INT33FC", }, 237 { "INT33FC", },
227 238
239 /* Braswell LPSS devices */
240 { "80862288", LPSS_ADDR(bsw_pwm_dev_desc) },
241 { "8086228A", LPSS_ADDR(byt_uart_dev_desc) },
242 { "8086228E", LPSS_ADDR(byt_spi_dev_desc) },
243 { "808622C1", LPSS_ADDR(byt_i2c_dev_desc) },
244
228 { "INT3430", LPSS_ADDR(lpt_dev_desc) }, 245 { "INT3430", LPSS_ADDR(lpt_dev_desc) },
229 { "INT3431", LPSS_ADDR(lpt_dev_desc) }, 246 { "INT3431", LPSS_ADDR(lpt_dev_desc) },
230 { "INT3432", LPSS_ADDR(lpt_i2c_dev_desc) }, 247 { "INT3432", LPSS_ADDR(lpt_i2c_dev_desc) },
@@ -402,7 +419,6 @@ static int acpi_lpss_create_device(struct acpi_device *adev,
402 adev->driver_data = pdata; 419 adev->driver_data = pdata;
403 pdev = acpi_create_platform_device(adev); 420 pdev = acpi_create_platform_device(adev);
404 if (!IS_ERR_OR_NULL(pdev)) { 421 if (!IS_ERR_OR_NULL(pdev)) {
405 device_enable_async_suspend(&pdev->dev);
406 return 1; 422 return 1;
407 } 423 }
408 424
@@ -593,7 +609,7 @@ static int acpi_lpss_suspend_late(struct device *dev)
593 return acpi_dev_suspend_late(dev); 609 return acpi_dev_suspend_late(dev);
594} 610}
595 611
596static int acpi_lpss_restore_early(struct device *dev) 612static int acpi_lpss_resume_early(struct device *dev)
597{ 613{
598 int ret = acpi_dev_resume_early(dev); 614 int ret = acpi_dev_resume_early(dev);
599 615
@@ -633,15 +649,15 @@ static int acpi_lpss_runtime_resume(struct device *dev)
633static struct dev_pm_domain acpi_lpss_pm_domain = { 649static struct dev_pm_domain acpi_lpss_pm_domain = {
634 .ops = { 650 .ops = {
635#ifdef CONFIG_PM_SLEEP 651#ifdef CONFIG_PM_SLEEP
636 .suspend_late = acpi_lpss_suspend_late,
637 .restore_early = acpi_lpss_restore_early,
638 .prepare = acpi_subsys_prepare, 652 .prepare = acpi_subsys_prepare,
639 .complete = acpi_subsys_complete, 653 .complete = acpi_subsys_complete,
640 .suspend = acpi_subsys_suspend, 654 .suspend = acpi_subsys_suspend,
641 .resume_early = acpi_subsys_resume_early, 655 .suspend_late = acpi_lpss_suspend_late,
656 .resume_early = acpi_lpss_resume_early,
642 .freeze = acpi_subsys_freeze, 657 .freeze = acpi_subsys_freeze,
643 .poweroff = acpi_subsys_suspend, 658 .poweroff = acpi_subsys_suspend,
644 .poweroff_late = acpi_subsys_suspend_late, 659 .poweroff_late = acpi_lpss_suspend_late,
660 .restore_early = acpi_lpss_resume_early,
645#endif 661#endif
646#ifdef CONFIG_PM_RUNTIME 662#ifdef CONFIG_PM_RUNTIME
647 .runtime_suspend = acpi_lpss_runtime_suspend, 663 .runtime_suspend = acpi_lpss_runtime_suspend,