All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ACPI / LPSS: Call lpss_iosf_exit_d3_state on device activate
@ 2017-06-26 21:56 Hans de Goede
  2017-06-26 21:57 ` [PATCH 2/2] ACPI / LPSS: Remove lpss_iosf_enter_d3_state() Hans de Goede
  2017-06-28 17:29 ` [PATCH 1/2] ACPI / LPSS: Call lpss_iosf_exit_d3_state on device activate kbuild test robot
  0 siblings, 2 replies; 6+ messages in thread
From: Hans de Goede @ 2017-06-26 21:56 UTC (permalink / raw)
  To: Rafael J . Wysocki, Len Brown, Andy Shevchenko; +Cc: Hans de Goede, linux-acpi

The purpose of lpss_iosf_exit_d3_state is to ensure that the LPSS DMA
controllers are in D0 and will not automatically power-down.

Since we do not know what the state is when activating a device, we
should call lpss_iosf_exit_d3_state on activate too.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/acpi/acpi_lpss.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
index 43f376aa7adc..51feee309b13 100644
--- a/drivers/acpi/acpi_lpss.c
+++ b/drivers/acpi/acpi_lpss.c
@@ -97,6 +97,8 @@ struct lpss_private_data {
 	u32 prv_reg_ctx[LPSS_PRV_REG_COUNT];
 };
 
+static void lpss_iosf_exit_d3_state(void);
+
 /* LPSS run time quirks */
 static unsigned int lpss_quirks;
 
@@ -682,6 +684,9 @@ static int acpi_lpss_activate(struct device *dev)
 	struct lpss_private_data *pdata = acpi_driver_data(ACPI_COMPANION(dev));
 	int ret;
 
+	if (lpss_quirks & LPSS_QUIRK_ALWAYS_POWER_ON && iosf_mbi_available())
+		lpss_iosf_exit_d3_state();
+
 	ret = acpi_dev_runtime_resume(dev);
 	if (ret)
 		return ret;
-- 
2.13.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-06-28 17:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-26 21:56 [PATCH 1/2] ACPI / LPSS: Call lpss_iosf_exit_d3_state on device activate Hans de Goede
2017-06-26 21:57 ` [PATCH 2/2] ACPI / LPSS: Remove lpss_iosf_enter_d3_state() Hans de Goede
2017-06-27 13:31   ` Andy Shevchenko
2017-06-27 13:56     ` Hans de Goede
2017-06-27 14:38       ` Andy Shevchenko
2017-06-28 17:29 ` [PATCH 1/2] ACPI / LPSS: Call lpss_iosf_exit_d3_state on device activate kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.