From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
Alan Stern <stern@rowland.harvard.edu>,
martyn.welch@collabora.co.uk,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Len Brown <len.brown@intel.com>,
Kevin Hilman <khilman@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Pavel Machek <pavel@ucw.cz>
Subject: Re: [PATCH v7 1/2] PM / sleep: Go direct_complete if driver has no callbacks
Date: Wed, 30 Sep 2015 23:17:38 +0200 [thread overview]
Message-ID: <13396826.8glsaARCUj@vostro.rjw.lan> (raw)
In-Reply-To: <CAAObsKBZLnRBQA-nDzWG1SEyjaR6W68XnS6vBpES=WEQQSWgiA@mail.gmail.com>
On Wednesday, September 30, 2015 03:59:48 PM Tomeu Vizoso wrote:
> On 30 September 2015 at 15:05, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> > On Wednesday, September 30, 2015 01:33:29 PM Ulf Hansson wrote:
> >> On 30 September 2015 at 11:58, Tomeu Vizoso <tomeu.vizoso@collabora.com> wrote:
> >> > @@ -1369,6 +1372,8 @@ int pm_genpd_remove_device(struct generic_pm_domain *genpd,
> >> >
> >> > genpd_free_dev_data(dev, gpd_data);
> >> >
> >> > + device_check_pm_callbacks(dev);
> >> > +
> >> > return 0;
> >>
> >> I can't tell whether this is an interesting feature to use for devices
> >> that gets attached to the ACPI PM domain. Although, you currently
> >> doesn't deal with that case, and too me I think this looks a bit
> >> weird/unsymmetrical.
> >
> > Good point.
> >
> > It needs to be done in every situation where a PM domain is or can be used.
> >
> > I guess we might require all PM domains to be attached to devices after
> > a successful probe at the latest (no PM domains should be attached/detached
> > after probe succeeds IOW), in which case it should be sufficient to do the
> > device_check_pm_callbacks() thing each time after probe successds.
> >
> > Thoughts?
>
> Sound good to me. How were you thinking of doing that? Manually
> checking that that's currently the case and adding a WARN() if a
> pm_domain is attached to a device that has been probed already?
I guess we need a function for setting/clearing the pm_domain pointer that
will check whether or not the device has been probed and WARN() in that case.
Then, convert all users of PM domains to use that function instead of
manipulating the pointer directly.
Thanks,
Rafael
next prev parent reply other threads:[~2015-09-30 20:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-30 9:58 [PATCH v7 0/2] Allow USB devices to remain runtime-suspended when sleeping Tomeu Vizoso
2015-09-30 9:58 ` [PATCH v7 1/2] PM / sleep: Go direct_complete if driver has no callbacks Tomeu Vizoso
2015-09-30 11:33 ` Ulf Hansson
2015-09-30 13:05 ` Rafael J. Wysocki
2015-09-30 13:23 ` Ulf Hansson
2015-09-30 13:59 ` Tomeu Vizoso
2015-09-30 21:17 ` Rafael J. Wysocki [this message]
2015-10-01 9:04 ` Ulf Hansson
2015-10-01 22:23 ` Rafael J. Wysocki
2015-09-30 9:58 ` [PATCH v7 2/2] USB / PM: Allow USB devices to remain runtime-suspended when sleeping Tomeu Vizoso
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=13396826.8glsaARCUj@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=gregkh@linuxfoundation.org \
--cc=khilman@kernel.org \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=martyn.welch@collabora.co.uk \
--cc=pavel@ucw.cz \
--cc=stern@rowland.harvard.edu \
--cc=tomeu.vizoso@collabora.com \
--cc=ulf.hansson@linaro.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