Re: [PATCH 1/2] PM / Runtime: Add sysfs switch for disabling devicerun-time PM (rev. 2)

From: Alan Stern
Date: Fri Feb 05 2010 - 10:19:23 EST


On Fri, 5 Feb 2010, Pavel Machek wrote:

>
> > > > + * The default for all devices is "auto", which means that devices may be
> > > > + * subject to automatic power management, depending on their drivers.
> > >
> > > Is it wise to specify 'auto' default value for devices without runtime
> > > pm?
> >
> > Yes, it is. It means the user space doesn't care whether or not the device is
> > power managed at run-time.
>
> Well, defaulting to 'on' for drivers when runtime pm is experimental
> seems logical. and there will be such drivers...

It's really not very important what the default setting is. Runtime PM
is always initially disabled, regardless of the "auto"/"on" setting,
until the driver explicitly enables it. At that time the driver also
has the option of changing the setting from "auto" to "on".

So if a driver writer wants to support runtime PM but thinks that his
implementation (or the device!) may be buggy, he can easily arrange
things so the user has to change the sysfs setting to make anything
happen.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/