Re: [patch] enums to clear suspend-state confusion

Pavel Machek
2004-08-18T00:27:42Z

Hi!

> > I can do that... but it will break compilation of every driver in the
> > tree. I can fix drivers I use and try to fix some more will sed, but
> > it will be painfull (and pretty big diff, and I'll probably miss some).
>
> That's OK - it's just an hour's work. I'd be more concerned about
> irritating people who are maintaining and using out-of-tree drivers.
>
> Can you remind me why we need _any_ of this? "enums to clear suspend-state
> confusion" sounds like something which is very optional. I'd be opting to
> go do something else instead ;)

Okay... currently, we are passing u32 down the drivers. Some pieces
interpret it as a PCI state, and some pieces interpret it as a system
state. We really do want system state to go down to the drivers, so
they can do different thing on reboot vs. just-before-suspend-to-disk
etc.

Now, Patrick has some plans with device power managment and they
included something bigger being passed down to the drivers. I wanted
to prepare for those plans.

I can replace suspend_state_t with enum system_state, but it might
mean that enum system_state will have to be extended with things like
RUNTIME_PM_PCI_D0 in future... I guess that's easiest thing to do. It
solves all the problems we have *now*.

Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!