Messages in this thread | | | Date | Mon, 5 Dec 2011 19:52:54 +1100 | From | NeilBrown <> | Subject | Re: [PATCH 1/1] driver core: disable device's runtime pm during shutdown |
| |
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/
[unhandled content-type:application/pgp-signature] | |