public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Chen Peter-B29397 <B29397@freescale.com>
Cc: Ming Lei <tom.leiming@gmail.com>,
	"Rafael J. Wysocki" <rjw@sisk.pl>, Greg KH <greg@kroah.com>,
	"gregkh@suse.de" <gregkh@suse.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"stern@rowland.harvard.edu" <stern@rowland.harvard.edu>,
	"hzpeterchen@gmail.com" <hzpeterchen@gmail.com>,
	Igor Grinberg <grinberg@compulab.co.il>
Subject: Re: [PATCH 1/1] driver core: disable device's runtime pm during shutdown
Date: Mon, 5 Dec 2011 19:52:54 +1100	[thread overview]
Message-ID: <20111205195254.2d2f21a1@notabene.brown> (raw)
In-Reply-To: <35AB98346D25394A9354ED89C4D7658722905B@039-SN1MPN1-002.039d.mgd.msft.net>

[-- Attachment #1: Type: text/plain, Size: 2621 bytes --]

On Mon, 5 Dec 2011 08:32:27 +0000 Chen Peter-B29397 <B29397@freescale.com>
wrote:

>  
> > > > stays
> > > > > > asleep, omap_i2c_xfer cannot wake it, the transfer doesn't happen
> > and
> > > > the
> > > > > > system doesn't get powered off.
> > > > > >
> > > > > > So here is a device that should *not* have pm disabled at
> > shutdown.
> > > > > >
> > > > > > So I feel this fix is a little too heavy-handed.
> > > > >
> > > > > Maybe the device's runtime PM should not be disabled if
> > > > > there is no ->shutdown defined in its driver, how about the blew?
> > > >
> > > > Thanks, but that won't actually help.
> > > >
> > > > dev->bus->shutdown is i2c_device_shutdown so there is a shutdown
> > method.
> > > > However i2c_device_shutdown just finds the driver can calls
> > > > driver->shutdown(), and that is the 'shutdown' that is NULL.
> > > >
> > > Then, i2c should be registered before than twl4030 as a platform device,
> > since
> > > twl4030 is an i2c device. Just let i2c shut down later than twl4030's.
> > 
> > It almost certainly is, but that is totally irrelevant.
> > 
> > The problem has nothing to do with ordering and nothing much to do with
> > ->shutdown() being called.
> > 
> > The problem is simply that pm_runtime_disable() is being called on all
> > devices, and that stops devices that are asleep from waking up.
> > 
> Please correct me if I am wrong
> 1. This change only affects when the user issues "reboot" or "shutdown"

well "halt -p" or "poweroff", but yes.

> 2. The pm_runtime_disable(dev) is only be called before this "dev" is
> coming to shutdown

Yes, but the important point is that is being called before pm_power_off is
called.

> 3. If i2c bus/driver->shutdown is not called, its runtime pm is still enabled.

I think you mean "disabled" ??

Yes, but I don't see how that is relevant.

> 4. You may issue i2c xfer after i2c bus/driver->shutdown is called.  

Yes, but again I cannot see the relevance.

NeilBrown


> 
> > I think the intention of putting that call in was to stop devices that
> > are
> > awake from going to sleep, and maybe that is justified.  But stopping
> > devices
> > that are asleep from waking up isn't.
> > 
> > NeilBrown
> > 
> > 
> > >
> > > > Thanks,
> > > > NeilBrown
> > > >
> > > >
> > > >
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2011-12-05  8:53 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-14  0:43 [PATCH 1/1] driver core: disable device's runtime pm during shutdown Peter Chen
2011-11-14  9:54 ` Ming Lei
2011-11-14 22:28   ` Rafael J. Wysocki
2011-11-14 22:27 ` Rafael J. Wysocki
2011-11-15  0:59   ` Greg KH
2011-11-15 23:16     ` Rafael J. Wysocki
2011-12-04 21:56       ` NeilBrown
2011-12-05  2:42         ` Alan Stern
2011-12-05  3:37           ` NeilBrown
2011-12-05  3:26         ` Ming Lei
2011-12-05  4:42           ` Chen Peter-B29397
2011-12-05  5:12             ` Ming Lei
2011-12-05  9:01               ` Ming Lei
2011-12-05  9:05                 ` Ming Lei
2011-12-05 16:02                   ` Alan Stern
2011-12-05 18:35                     ` NeilBrown
2011-12-05 20:55                       ` Alan Stern
2011-12-05 22:32                         ` Rafael J. Wysocki
2011-12-06 15:26                           ` [PATCH] Driver core: leave runtime PM enabled during system shutdown Alan Stern
2011-12-06 21:34                             ` NeilBrown
2011-12-06 21:48                             ` Greg KH
2011-12-06 22:05                               ` Rafael J. Wysocki
2011-12-06 22:03                             ` Rafael J. Wysocki
2011-12-05  4:53           ` [PATCH 1/1] driver core: disable device's runtime pm during shutdown NeilBrown
2011-12-05  5:53             ` Chen Peter-B29397
2011-12-05  8:08               ` NeilBrown
2011-12-05  8:32                 ` Chen Peter-B29397
2011-12-05  8:52                   ` NeilBrown [this message]
2011-12-05  3:29         ` Chen Peter-B29397
2011-12-05  5:09           ` NeilBrown

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=20111205195254.2d2f21a1@notabene.brown \
    --to=neilb@suse.de \
    --cc=B29397@freescale.com \
    --cc=greg@kroah.com \
    --cc=gregkh@suse.de \
    --cc=grinberg@compulab.co.il \
    --cc=hzpeterchen@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=stern@rowland.harvard.edu \
    --cc=tom.leiming@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox