Re: [linux-pm] [PATCH 3/5] [pm] Respect the actual device powerstates in sysfs interface

From: Patrick Mochel
Date: Sun Feb 19 2006 - 19:34:33 EST



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
-
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/