On Thursday 28 October 2004 14:00, Pavel Machek wrote: > > > > Currently that state comes in two parts: > > > > - Hardware ... look at registers, see if "reset" path is right > > - Software ... maybe registers aren't sufficient for this hw > > > > If software state was needed, it had to have been set up > > earlier before that system sleep transition. I still don't > > see a need for more resume() state. > > You are suggesting > > foo_resume(void) foo_resume(device) ... not foo->resume(void) C++ style! > { > if (!ask_hardware_if_it_is_initialized()) > initialize_hw(); Not exactly; if BIOS initialized it, we have to reinit. It has to be in a state compatible with how Linux left the device. > } > > while I see some value in > > foo_resume(power_t state) foo_resume(device, somekinda_power_state) > { > if (STATE_LOST(state)) > initialize_hw(); That seems like the "software" case I gave, in which case device->driver_data can hold the answer to STATE_LOST. It'll have known it in advance, maybe even based on board-specific logic. > } > > It is only speed optimalization, but I undestand why someone would > like to do it. I'm just pushing back on core API changes, to make sure I understand the anticipated benefit. They all have a drawback: lots of driver changes! - Dave Pavel > -- > People were complaining that M$ turns users into beta-testers... > ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl! >