All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ACPI / PM: Fixes related to the D3cold power state
@ 2013-01-22 12:15 Rafael J. Wysocki
  2013-01-22 12:16 ` [PATCH 1/2] ACPI / PM: Use string "D3cold" to represent ACPI_STATE_D3_COLD Rafael J. Wysocki
  2013-01-22 12:18 ` [PATCH 2/2] ACPI / PM: Fix device power state value after transitions to D3cold Rafael J. Wysocki
  0 siblings, 2 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2013-01-22 12:15 UTC (permalink / raw)
  To: ACPI Devel Maling List; +Cc: LKML, Mika Westerberg

Hi All,

The following two patches fix issues related to the ACPI D3cold state:

[1/2] Use "D3cold" as the string representation of D3cold rather than "D3".
[2/2] Fix final value of power.state after device transitions to D3cold.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* [PATCH 1/2] ACPI / PM: Use string "D3cold" to represent ACPI_STATE_D3_COLD
  2013-01-22 12:15 [PATCH 0/2] ACPI / PM: Fixes related to the D3cold power state Rafael J. Wysocki
@ 2013-01-22 12:16 ` Rafael J. Wysocki
  2013-01-22 12:18 ` [PATCH 2/2] ACPI / PM: Fix device power state value after transitions to D3cold Rafael J. Wysocki
  1 sibling, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2013-01-22 12:16 UTC (permalink / raw)
  To: ACPI Devel Maling List; +Cc: LKML, Mika Westerberg

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Make acpi_power_state_string() return "D3cold" as the string
representation of ACPI power state D3cold instead of "D3" returned
currently, which is confusing.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/acpi/device_pm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-pm/drivers/acpi/device_pm.c
===================================================================
--- linux-pm.orig/drivers/acpi/device_pm.c
+++ linux-pm/drivers/acpi/device_pm.c
@@ -115,7 +115,7 @@ const char *acpi_power_state_string(int
 	case ACPI_STATE_D3_HOT:
 		return "D3hot";
 	case ACPI_STATE_D3_COLD:
-		return "D3";
+		return "D3cold";
 	default:
 		return "(unknown)";
 	}

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

* [PATCH 2/2] ACPI / PM: Fix device power state value after transitions to D3cold
  2013-01-22 12:15 [PATCH 0/2] ACPI / PM: Fixes related to the D3cold power state Rafael J. Wysocki
  2013-01-22 12:16 ` [PATCH 1/2] ACPI / PM: Use string "D3cold" to represent ACPI_STATE_D3_COLD Rafael J. Wysocki
@ 2013-01-22 12:18 ` Rafael J. Wysocki
  1 sibling, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2013-01-22 12:18 UTC (permalink / raw)
  To: ACPI Devel Maling List; +Cc: LKML, Mika Westerberg

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

When a transition to the D3cold power state is requested,
acpi_device_set_power() first carries out a transition to D3hot and
then turns off the device's power resources.  However, it fails to
update the device's power.state field appropriately and D3hot is
stored in it as a result.

Fix this, but make sure that the device's power.state value will be
D3hot if its power resources cannot be turned off in the final step.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/acpi/device_pm.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Index: linux-pm/drivers/acpi/device_pm.c
===================================================================
--- linux-pm.orig/drivers/acpi/device_pm.c
+++ linux-pm/drivers/acpi/device_pm.c
@@ -264,8 +264,11 @@ int acpi_device_set_power(struct acpi_de
 	if (result)
 		goto end;
 
-	if (cut_power)
-		result = acpi_power_transition(device, ACPI_STATE_D3_COLD);
+	if (cut_power) {
+		device->power.state = state;
+		state = ACPI_STATE_D3_COLD;
+		result = acpi_power_transition(device, state);
+	}
 
  end:
 	if (result) {


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

end of thread, other threads:[~2013-01-22 12:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-22 12:15 [PATCH 0/2] ACPI / PM: Fixes related to the D3cold power state Rafael J. Wysocki
2013-01-22 12:16 ` [PATCH 1/2] ACPI / PM: Use string "D3cold" to represent ACPI_STATE_D3_COLD Rafael J. Wysocki
2013-01-22 12:18 ` [PATCH 2/2] ACPI / PM: Fix device power state value after transitions to D3cold Rafael J. Wysocki

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.