All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] PM: Correct whitespace errors in <linux/pm.h>
@ 2014-03-17 20:26 Geert Uytterhoeven
  2014-03-17 20:26 ` [PATCH 2/2] PM / Runtime: Update runtime_idle() documentation for return value meaning Geert Uytterhoeven
  2014-03-19 22:50 ` [PATCH 1/2] PM: Correct whitespace errors in <linux/pm.h> Rafael J. Wysocki
  0 siblings, 2 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2014-03-17 20:26 UTC (permalink / raw)
  To: Pavel Machek, Rafael J. Wysocki, Len Brown
  Cc: linux-pm, linux-kernel, Geert Uytterhoeven

From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>

Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
---
 include/linux/pm.h |   32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/include/linux/pm.h b/include/linux/pm.h
index 8c6583a53a06..22ba7338d48c 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -379,7 +379,7 @@ const struct dev_pm_ops name = { \
  *
  * ON		No transition.
  *
- * FREEZE 	System is going to hibernate, call ->prepare() and ->freeze()
+ * FREEZE	System is going to hibernate, call ->prepare() and ->freeze()
  *		for all devices.
  *
  * SUSPEND	System is going to suspend, call ->prepare() and ->suspend()
@@ -423,7 +423,7 @@ const struct dev_pm_ops name = { \
 
 #define PM_EVENT_INVALID	(-1)
 #define PM_EVENT_ON		0x0000
-#define PM_EVENT_FREEZE 	0x0001
+#define PM_EVENT_FREEZE		0x0001
 #define PM_EVENT_SUSPEND	0x0002
 #define PM_EVENT_HIBERNATE	0x0004
 #define PM_EVENT_QUIESCE	0x0008
@@ -612,11 +612,11 @@ struct dev_pm_domain {
  * message is implicit:
  *
  * ON		Driver starts working again, responding to hardware events
- * 		and software requests.  The hardware may have gone through
- * 		a power-off reset, or it may have maintained state from the
- * 		previous suspend() which the driver will rely on while
- * 		resuming.  On most platforms, there are no restrictions on
- * 		availability of resources like clocks during resume().
+ *		and software requests.  The hardware may have gone through
+ *		a power-off reset, or it may have maintained state from the
+ *		previous suspend() which the driver will rely on while
+ *		resuming.  On most platforms, there are no restrictions on
+ *		availability of resources like clocks during resume().
  *
  * Other transitions are triggered by messages sent using suspend().  All
  * these transitions quiesce the driver, so that I/O queues are inactive.
@@ -626,21 +626,21 @@ struct dev_pm_domain {
  * differ according to the message:
  *
  * SUSPEND	Quiesce, enter a low power device state appropriate for
- * 		the upcoming system state (such as PCI_D3hot), and enable
- * 		wakeup events as appropriate.
+ *		the upcoming system state (such as PCI_D3hot), and enable
+ *		wakeup events as appropriate.
  *
  * HIBERNATE	Enter a low power device state appropriate for the hibernation
- * 		state (eg. ACPI S4) and enable wakeup events as appropriate.
+ *		state (eg. ACPI S4) and enable wakeup events as appropriate.
  *
  * FREEZE	Quiesce operations so that a consistent image can be saved;
- * 		but do NOT otherwise enter a low power device state, and do
- * 		NOT emit system wakeup events.
+ *		but do NOT otherwise enter a low power device state, and do
+ *		NOT emit system wakeup events.
  *
  * PRETHAW	Quiesce as if for FREEZE; additionally, prepare for restoring
- * 		the system from a snapshot taken after an earlier FREEZE.
- * 		Some drivers will need to reset their hardware state instead
- * 		of preserving it, to ensure that it's never mistaken for the
- * 		state which that earlier snapshot had set up.
+ *		the system from a snapshot taken after an earlier FREEZE.
+ *		Some drivers will need to reset their hardware state instead
+ *		of preserving it, to ensure that it's never mistaken for the
+ *		state which that earlier snapshot had set up.
  *
  * A minimally power-aware driver treats all messages as SUSPEND, fully
  * reinitializes its device during resume() -- whether or not it was reset
-- 
1.7.9.5


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

* [PATCH 2/2] PM / Runtime: Update runtime_idle() documentation for return value meaning
  2014-03-17 20:26 [PATCH 1/2] PM: Correct whitespace errors in <linux/pm.h> Geert Uytterhoeven
@ 2014-03-17 20:26 ` Geert Uytterhoeven
  2014-03-17 20:27   ` Pavel Machek
  2014-03-19 22:50 ` [PATCH 1/2] PM: Correct whitespace errors in <linux/pm.h> Rafael J. Wysocki
  1 sibling, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2014-03-17 20:26 UTC (permalink / raw)
  To: Pavel Machek, Rafael J. Wysocki, Len Brown
  Cc: linux-pm, linux-kernel, Geert Uytterhoeven

From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>

As of commit 45f0a85c8258741d11bda25c0a5669c06267204a ('PM / Runtime:
Rework the "runtime idle" helper routine'), the return value of
->runtime_idle() is no longer ignored by the PM core, but used to decide
whether to suspend the device or not.

Update the documentation to match the code.

Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
---
 include/linux/pm.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/pm.h b/include/linux/pm.h
index 22ba7338d48c..dce45304f77e 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -264,9 +264,9 @@ typedef struct pm_message {
  *	registers, so that it is fully operational.
  *
  * @runtime_idle: Device appears to be inactive and it might be put into a
- *	low-power state if all of the necessary conditions are satisfied.  Check
- *	these conditions and handle the device as appropriate, possibly queueing
- *	a suspend request for it.  The return value is ignored by the PM core.
+ *	low-power state if all of the necessary conditions are satisfied.
+ *	Check these conditions, and return 0 if it's appropriate to let the PM
+ *	core queue a suspend request for the device.
  *
  * Refer to Documentation/power/runtime_pm.txt for more information about the
  * role of the above callbacks in device runtime power management.
-- 
1.7.9.5


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

* Re: [PATCH 2/2] PM / Runtime: Update runtime_idle() documentation for return value meaning
  2014-03-17 20:26 ` [PATCH 2/2] PM / Runtime: Update runtime_idle() documentation for return value meaning Geert Uytterhoeven
@ 2014-03-17 20:27   ` Pavel Machek
  0 siblings, 0 replies; 6+ messages in thread
From: Pavel Machek @ 2014-03-17 20:27 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Rafael J. Wysocki, Len Brown, linux-pm, linux-kernel, Geert Uytterhoeven

On Mon 2014-03-17 21:26:11, Geert Uytterhoeven wrote:
> From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
> 
> As of commit 45f0a85c8258741d11bda25c0a5669c06267204a ('PM / Runtime:
> Rework the "runtime idle" helper routine'), the return value of
> ->runtime_idle() is no longer ignored by the PM core, but used to decide
> whether to suspend the device or not.
> 
> Update the documentation to match the code.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>

Acked-by: Pavel Machek <pavel@ucw.cz>


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

* Re: [PATCH 1/2] PM: Correct whitespace errors in <linux/pm.h>
  2014-03-17 20:26 [PATCH 1/2] PM: Correct whitespace errors in <linux/pm.h> Geert Uytterhoeven
  2014-03-17 20:26 ` [PATCH 2/2] PM / Runtime: Update runtime_idle() documentation for return value meaning Geert Uytterhoeven
@ 2014-03-19 22:50 ` Rafael J. Wysocki
  2014-03-20  7:54   ` Geert Uytterhoeven
  1 sibling, 1 reply; 6+ messages in thread
From: Rafael J. Wysocki @ 2014-03-19 22:50 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Pavel Machek, Len Brown, linux-pm, linux-kernel, Geert Uytterhoeven

On Monday, March 17, 2014 09:26:10 PM Geert Uytterhoeven wrote:
> From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>

Why exactly are they errors?

> Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
> ---
>  include/linux/pm.h |   32 ++++++++++++++++----------------
>  1 file changed, 16 insertions(+), 16 deletions(-)
> 
> diff --git a/include/linux/pm.h b/include/linux/pm.h
> index 8c6583a53a06..22ba7338d48c 100644
> --- a/include/linux/pm.h
> +++ b/include/linux/pm.h
> @@ -379,7 +379,7 @@ const struct dev_pm_ops name = { \
>   *
>   * ON		No transition.
>   *
> - * FREEZE 	System is going to hibernate, call ->prepare() and ->freeze()
> + * FREEZE	System is going to hibernate, call ->prepare() and ->freeze()
>   *		for all devices.
>   *
>   * SUSPEND	System is going to suspend, call ->prepare() and ->suspend()
> @@ -423,7 +423,7 @@ const struct dev_pm_ops name = { \
>  
>  #define PM_EVENT_INVALID	(-1)
>  #define PM_EVENT_ON		0x0000
> -#define PM_EVENT_FREEZE 	0x0001
> +#define PM_EVENT_FREEZE		0x0001
>  #define PM_EVENT_SUSPEND	0x0002
>  #define PM_EVENT_HIBERNATE	0x0004
>  #define PM_EVENT_QUIESCE	0x0008
> @@ -612,11 +612,11 @@ struct dev_pm_domain {
>   * message is implicit:
>   *
>   * ON		Driver starts working again, responding to hardware events
> - * 		and software requests.  The hardware may have gone through
> - * 		a power-off reset, or it may have maintained state from the
> - * 		previous suspend() which the driver will rely on while
> - * 		resuming.  On most platforms, there are no restrictions on
> - * 		availability of resources like clocks during resume().
> + *		and software requests.  The hardware may have gone through
> + *		a power-off reset, or it may have maintained state from the
> + *		previous suspend() which the driver will rely on while
> + *		resuming.  On most platforms, there are no restrictions on
> + *		availability of resources like clocks during resume().
>   *
>   * Other transitions are triggered by messages sent using suspend().  All
>   * these transitions quiesce the driver, so that I/O queues are inactive.
> @@ -626,21 +626,21 @@ struct dev_pm_domain {
>   * differ according to the message:
>   *
>   * SUSPEND	Quiesce, enter a low power device state appropriate for
> - * 		the upcoming system state (such as PCI_D3hot), and enable
> - * 		wakeup events as appropriate.
> + *		the upcoming system state (such as PCI_D3hot), and enable
> + *		wakeup events as appropriate.
>   *
>   * HIBERNATE	Enter a low power device state appropriate for the hibernation
> - * 		state (eg. ACPI S4) and enable wakeup events as appropriate.
> + *		state (eg. ACPI S4) and enable wakeup events as appropriate.
>   *
>   * FREEZE	Quiesce operations so that a consistent image can be saved;
> - * 		but do NOT otherwise enter a low power device state, and do
> - * 		NOT emit system wakeup events.
> + *		but do NOT otherwise enter a low power device state, and do
> + *		NOT emit system wakeup events.
>   *
>   * PRETHAW	Quiesce as if for FREEZE; additionally, prepare for restoring
> - * 		the system from a snapshot taken after an earlier FREEZE.
> - * 		Some drivers will need to reset their hardware state instead
> - * 		of preserving it, to ensure that it's never mistaken for the
> - * 		state which that earlier snapshot had set up.
> + *		the system from a snapshot taken after an earlier FREEZE.
> + *		Some drivers will need to reset their hardware state instead
> + *		of preserving it, to ensure that it's never mistaken for the
> + *		state which that earlier snapshot had set up.
>   *
>   * A minimally power-aware driver treats all messages as SUSPEND, fully
>   * reinitializes its device during resume() -- whether or not it was reset
> 

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

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

* Re: [PATCH 1/2] PM: Correct whitespace errors in <linux/pm.h>
  2014-03-19 22:50 ` [PATCH 1/2] PM: Correct whitespace errors in <linux/pm.h> Rafael J. Wysocki
@ 2014-03-20  7:54   ` Geert Uytterhoeven
  2014-03-20 12:22     ` Rafael J. Wysocki
  0 siblings, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2014-03-20  7:54 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Pavel Machek, Len Brown, Linux PM list, linux-kernel, Geert Uytterhoeven

Hi Rafael,

On Wed, Mar 19, 2014 at 11:50 PM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> On Monday, March 17, 2014 09:26:10 PM Geert Uytterhoeven wrote:
>> From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
>
> Why exactly are they errors?

checkpatch.pl says: "WARNING: please, no space before tabs",
Vim (with "let c_space_errors=1") shows them in red.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 1/2] PM: Correct whitespace errors in <linux/pm.h>
  2014-03-20  7:54   ` Geert Uytterhoeven
@ 2014-03-20 12:22     ` Rafael J. Wysocki
  0 siblings, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2014-03-20 12:22 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Pavel Machek, Len Brown, Linux PM list, linux-kernel, Geert Uytterhoeven

On Thursday, March 20, 2014 08:54:39 AM Geert Uytterhoeven wrote:
> Hi Rafael,
> 
> On Wed, Mar 19, 2014 at 11:50 PM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> > On Monday, March 17, 2014 09:26:10 PM Geert Uytterhoeven wrote:
> >> From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
> >
> > Why exactly are they errors?
> 
> checkpatch.pl says: "WARNING: please, no space before tabs",
> Vim (with "let c_space_errors=1") shows them in red.

Fair enough.

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

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

end of thread, other threads:[~2014-03-20 12:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-17 20:26 [PATCH 1/2] PM: Correct whitespace errors in <linux/pm.h> Geert Uytterhoeven
2014-03-17 20:26 ` [PATCH 2/2] PM / Runtime: Update runtime_idle() documentation for return value meaning Geert Uytterhoeven
2014-03-17 20:27   ` Pavel Machek
2014-03-19 22:50 ` [PATCH 1/2] PM: Correct whitespace errors in <linux/pm.h> Rafael J. Wysocki
2014-03-20  7:54   ` Geert Uytterhoeven
2014-03-20 12:22     ` 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.