Re: [PM] powering down special devices

Patrick Mochel
2003-08-25T19:00:05Z

> > The decision to kill the level parameter came from extensive discussions
> > with Benh, who convinced me that we only need to call ->suspend() once for
> > any device; though we still need to somehow provide for those that need to
> > power down with interrupts disabled. I suggested -EAGAIN, since it allows
> > us to special case those that need it, with the minimum amount of impact.
> > Ben agreed with me.
>
> Well... I think I told you I don't like much the check on the interrupt
> and tended to prefer either a separate power_down_irq callback or a
> parameter, but that would mean changing prototype for drivers... I
> agreed we can live with your current scheme though.

How about a flag in the power struct, which would place the device on a
completely separate list from the beginning. The drivers should know
whether a device needs special handling a priori, so we don't even need to
touch it during the first iteration of the lists.

This would eliminate the need to check in the drivers, have no impact on
the majority of drivers, and allow us to easily determine whether or not
the device supports runtime power management.

Pat