Re: [PATCH 3/5] [pm] Respect the actual device power states in sysfs interface

Patrick Mochel
2006-02-20T00:36:34Z

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1087 bytes --]

On Mon, 20 Feb 2006, Pavel Machek wrote:

> On Ne 19-02-06 16:17:01, Patrick Mochel wrote:

> > I really fail to see what your fundamental objection is. This restores
> > compatability, makes the core simpler, and adds the ability to use the
> > additional states, should drivers choose to implement them; all for
> > relatively little code. It seems a like a good thing to me..
>
> Compatibility is already restored.

No, the interface is currently broken. The driver core does not dictate
what values are valid or invalid. It is meant to be used by the bus
drivers to help provide a simiar interface as each other, and to reduce
duplicate code.

It should not be filtering the value. Period. That is a policy decision,
and what is worse, is that it is a static, hard-coded policy decision. The
decision to only accept "0", "2", or "3" is a decision that should be made
on a bus-by-bus basis.

> Introducing additional states should be done in right way, something
> we can keep long-term.

Yup, and it starts with the core not deciding what values are wrong or
right.

Thanks,

Pat