All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Scott Wood <scottwood@freescale.com>
Cc: linuxppc-dev list <linuxppc-dev@ozlabs.org>,
	Johannes Berg <johannes@sipsolutions.net>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-pm <linux-pm@lists.linux-foundation.org>
Subject: Re: [RFC] powermac: proper sleep management
Date: Fri, 09 Nov 2007 10:19:16 +1100	[thread overview]
Message-ID: <1194563956.6561.20.camel@pasglop> (raw)
In-Reply-To: <47336035.4020609@freescale.com>


On Thu, 2007-11-08 at 13:15 -0600, Scott Wood wrote:
> Johannes Berg wrote:
> > +/*
> > + * overrides the weak arch_suspend_disable_irqs in kernel/power/main.c
> > + *
> > + * XXX: Once Scott Wood's patch is merged, this needs to use the ppc_md
> > + *	hooks that patch adds!
> > + */
> > +void arch_suspend_disable_irqs(void)
> > +{
> > +#ifdef CONFIG_PMAC_BACKLIGHT
> > +	/* Tell backlight code not to muck around with the chip anymore */
> > +	pmu_backlight_set_sleep(1);
> > +#endif
>  > +
> > +	/* Call platform functions marked "on sleep" */
> > +	pmac_pfunc_i2c_suspend();
> > +	pmac_pfunc_base_suspend();
> 
> Shouldn't these be done from suspend methods of the relevant drivers?
> I don't understand why this needs to go in the disable IRQ hook.

The pmac_pfunc thing is low level platform stuff, no driver involved
there, this is the right place to do it.

As for the backlight bits, that could indeed be moved around I suppose,
I'd keep it there for now and look at cleaning the PMU driver
suspend/resume path in a second step.

Ben.

WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Scott Wood <scottwood@freescale.com>
Cc: linuxppc-dev list <linuxppc-dev@ozlabs.org>,
	Johannes Berg <johannes@sipsolutions.net>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-pm <linux-pm@lists.linux-foundation.org>,
	Paul Mackerras <paulus@samba.org>
Subject: Re: [RFC] powermac: proper sleep management
Date: Fri, 09 Nov 2007 10:19:16 +1100	[thread overview]
Message-ID: <1194563956.6561.20.camel@pasglop> (raw)
In-Reply-To: <47336035.4020609@freescale.com>


On Thu, 2007-11-08 at 13:15 -0600, Scott Wood wrote:
> Johannes Berg wrote:
> > +/*
> > + * overrides the weak arch_suspend_disable_irqs in kernel/power/main.c
> > + *
> > + * XXX: Once Scott Wood's patch is merged, this needs to use the ppc_md
> > + *	hooks that patch adds!
> > + */
> > +void arch_suspend_disable_irqs(void)
> > +{
> > +#ifdef CONFIG_PMAC_BACKLIGHT
> > +	/* Tell backlight code not to muck around with the chip anymore */
> > +	pmu_backlight_set_sleep(1);
> > +#endif
>  > +
> > +	/* Call platform functions marked "on sleep" */
> > +	pmac_pfunc_i2c_suspend();
> > +	pmac_pfunc_base_suspend();
> 
> Shouldn't these be done from suspend methods of the relevant drivers?
> I don't understand why this needs to go in the disable IRQ hook.

The pmac_pfunc thing is low level platform stuff, no driver involved
there, this is the right place to do it.

As for the backlight bits, that could indeed be moved around I suppose,
I'd keep it there for now and look at cleaning the PMU driver
suspend/resume path in a second step.

Ben.

  reply	other threads:[~2007-11-08 23:19 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-08 12:08 [RFC] powermac: proper sleep management Johannes Berg
2007-11-08 12:08 ` Johannes Berg
2007-11-08 19:15 ` Scott Wood
2007-11-08 23:19   ` Benjamin Herrenschmidt [this message]
2007-11-08 23:19     ` Benjamin Herrenschmidt
2007-11-08 19:15 ` Scott Wood
2007-11-11 13:35 ` Pavel Machek
2007-11-11 13:35   ` [linux-pm] " Pavel Machek
2007-11-11 20:59 ` Benjamin Herrenschmidt
2007-11-11 20:59   ` Benjamin Herrenschmidt
2007-11-12 16:32   ` Johannes Berg
2007-11-12 16:32   ` Johannes Berg
2007-11-12 19:52     ` Alan Stern
2007-11-12 19:52       ` [linux-pm] " Alan Stern
2007-11-13 13:19       ` Johannes Berg
2007-11-13 13:19       ` Johannes Berg
2007-11-12 20:24     ` Benjamin Herrenschmidt
2007-11-12 20:24       ` Benjamin Herrenschmidt
2007-11-12 20:40       ` Alan Stern
2007-11-12 20:40       ` [linux-pm] " Alan Stern
2007-11-12 20:56         ` Benjamin Herrenschmidt
2007-11-12 20:56         ` [linux-pm] " Benjamin Herrenschmidt
2007-11-12 21:52           ` Alan Stern
2007-11-12 21:52           ` [linux-pm] " Alan Stern

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=1194563956.6561.20.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=dwmw2@infradead.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=scottwood@freescale.com \
    /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 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.