public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Len Brown <lenb@kernel.org>,
	Linux Kernel List <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	pm list <linux-pm@lists.linux-foundation.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>
Subject: Re: 900af0d breaks some embedded suspend/resume
Date: Sat, 18 Apr 2009 19:09:07 +0100	[thread overview]
Message-ID: <20090418180907.GD7148@flint.arm.linux.org.uk> (raw)
In-Reply-To: <200904181709.47480.rjw@sisk.pl>

On Sat, Apr 18, 2009 at 05:09:46PM +0200, Rafael J. Wysocki wrote:
> On Saturday 18 April 2009, Russell King wrote:
> > No, sysdevs are shut down after IRQs are turned off and the I2C driver
> > has been shut down.  The I2C driver needs IRQs to work in slave mode,
> > and we need slave mode to work.
> 
> Hm, but up to and including 2.6.29 we called the late suspend callbacks with
> interrupts off.

That's not related to the problem - since all that the I2C drivers
late suspend callback does is shut the I2C driver down.

It's what happens between the normal suspend callback (which occurs
with IRQs on) and the late suspend callback which I'm interested in,
which is when the platform's 'prepare' method is called.

> Hmm, what about redefining platform_suspend_ops in the following way:
> 
> struct platform_suspend_ops {
> 	int (*valid)(suspend_state_t state);
> 	int (*begin)(suspend_state_t state);
> 	int (*devices_suspended)(void);
> 	int (*prepare)(void);
> 	int (*enter)(suspend_state_t state);
> 	void (*wake)(void);
> 	int (*resume_devices)(void);
> 	void (*end)(void);
> 	void (*recover)(void);
> };
> 
> where:
> 
> * begin() will be called before suspending devices (no change)
> * devices_suspended() will be called after suspending devices (before
>   suspend_device_irqs())
> * prepare() will be callled after the late suspend callbacks
> * enter() will be called to enter the sleep state (no change)
> * wake() will be called before the early resume callbacks
> * resume_devices() will be called before resuming devices (after
>   resume_device_irqs()
> * end() will be called after resuming devices (no change)
> 
> I don't think we'll need more platform hooks than that.

I'd be happy with that.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

  reply	other threads:[~2009-04-19  2:43 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-17 23:10 900af0d breaks some embedded suspend/resume Russell King
2009-04-18 13:23 ` Rafael J. Wysocki
2009-04-18 13:53   ` Russell King
2009-04-18 14:26     ` Rafael J. Wysocki
2009-04-18 14:41       ` Russell King
2009-04-18 15:09         ` Rafael J. Wysocki
2009-04-18 18:09           ` Russell King [this message]
2009-04-18 18:47         ` [PATCH] PM/Suspend: Introduce two new platform callbacks to avoid breakage (Re: 900af0d breaks some embedded suspend/resume) Rafael J. Wysocki
2009-04-19 17:57           ` Len Brown
2009-04-19 20:03             ` Russell King
2009-04-20  0:50               ` Rafael J. Wysocki
2009-04-20  0:56               ` [GIT PULL] PM update for 2.6.30 Rafael J. Wysocki
2009-04-19 23:31           ` [PATCH] PM/Suspend: Introduce two new platform callbacks to avoid breakage (Re: 900af0d breaks some embedded suspend/resume) Nigel Cunningham
2009-04-20  0:50             ` Rafael J. Wysocki
2009-04-20  8:35             ` Russell King
2009-04-20  8:48               ` Nigel Cunningham
2009-04-18 14:42       ` 900af0d breaks some embedded suspend/resume Rafael J. Wysocki
2009-04-18 19:06     ` Linus Torvalds
2009-04-18 22:44       ` Rafael J. Wysocki
2009-04-26  9:25         ` Pavel Machek
2009-04-18 13:59   ` Rafael J. Wysocki
2009-04-18 14:28     ` Russell King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090418180907.GD7148@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=rjw@sisk.pl \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox