mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* sl811h_suspend() and PM_EVENT_PRETHAW state handling
@ 2013-08-06 17:14 Shuah Khan
  2013-08-06 18:38 ` Alan Stern
  0 siblings, 1 reply; 7+ messages in thread
From: Shuah Khan @ 2013-08-06 17:14 UTC (permalink / raw)
  To: david-b, dbrownell, rjw, pavel, stern; +Cc: linux-kernel

sl811h_suspend() seems to be the odd routine in the way it handles the 
PM_EVENT_PRETHAW state. It treats it same as PM_EVENT_SUSPEND and 
PM_EVENT_HIBERNATE. All other uses I could find treat it same as 
PM_EVENT_FREEZE and PM_EVENT_QUIESCE. Makes sense since PM_EVENT_PRETHAW 
is PM_EVENT_QUIESCE.

#define PM_EVENT_PRETHAW PM_EVENT_QUIESCE

Reference: Commit 185849991d592497e43bcd264c6152af1261ffe2 introduced 
PM_EVENT_PRETHAW state to sl811h_suspend().

Couple of questions?

- Why does sl811h_suspend() treat PM_EVENT_PRETHAW different from 
PM_EVENT_FREEZE?

There is no problem with this code as such, since state is passed in. 
However, this usage conflicts with the rest of the usages and the way 
pm_op() routine maps PM_EVENT_PRETHAW/PM_EVENT_QUIESCE to freeze() pm_ops.

         case PM_EVENT_FREEZE:
         case PM_EVENT_QUIESCE:
                 return ops->freeze;

Assuming the handling PM_EVENT_PRETHAW is correct in this routine, what 
would be the right mapping for this legacy handling to dev_pm_ops?

-- Shuah

Shuah Khan, Linux Kernel Developer - Open Source Group Samsung Research 
America (Silicon Valley) shuah.kh@samsung.com | (970) 672-0658

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

end of thread, other threads:[~2013-08-06 22:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-06 17:14 sl811h_suspend() and PM_EVENT_PRETHAW state handling Shuah Khan
2013-08-06 18:38 ` Alan Stern
2013-08-06 20:37   ` Shuah Khan
2013-08-06 21:21     ` Alan Stern
2013-08-06 21:38       ` Shuah Khan
2013-08-06 22:38         ` Rafael J. Wysocki
2013-08-06 22:31           ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®