[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150527104102.GF1747@lahna.fi.intel.com>
Date: Wed, 27 May 2015 13:41:02 +0300
From: Mika Westerberg <mika.westerberg@...ux.intel.com>
To: Lee Jones <lee.jones@...aro.org>
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
linux-acpi@...r.kernel.org, linux-pm@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Vinod Koul <vinod.koul@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, dmaengine@...r.kernel.org,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Jarkko Nikula <jarkko.nikula@...ux.intel.com>
Subject: Re: [PATCH v2 8/8] mfd: Add support for Intel Sunrisepoint LPSS
devices
On Wed, May 27, 2015 at 11:22:41AM +0100, Lee Jones wrote:
> > +static int resume_lpss_device(struct device *dev, void *data)
> > +{
> > + pm_runtime_resume(dev);
> > + return 0;
> > +}
> > +
> > +int intel_lpss_prepare(struct device *dev)
> > +{
> > + /*
> > + * Resume both child devices before entering system sleep. This
> > + * ensures that they are in proper state before they get suspended.
> > + */
> > + device_for_each_child_reverse(dev, NULL, resume_lpss_device);
>
> Why can't you do this in intel_lpss_suspend()?
>
> Then you can get rid of all the hand-rolled nonsense you have in the
> header file and use SET_SYSTEM_SLEEP_PM_OPS instead.
>
> Does something happen after .prepare() and before .suspend() that
> prevents this from working?
At that time all children are already suspended (to system sleep) so we
cannot bring them out of runtime suspend anymore.
.prepare() is executed for all devices before suspend callbacks for
each device.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists