[openbeos] Re: driver loading question

"Bruno van Dooren" <bruno_van_dooren@xxxxxxxxxxx> wrote:
> i have been working on the ps2 device driver, and things are finally 
> starting to work.
> one major problem is that for the moment, keyboard detection (and 
> mouse 
> detection) are done in init_hardware, and that apparently it is 
> normal for 
> ps2 devices to have timeouts of up to 1 sec.
> 
> the result of this is that the boot time increases by a few seconds 
> because 
> booting does not continue until all init_hardware calls are ready. 
> this 
> sucks, because boot time should be as short as possible.
> 
> a possible solution is to always return B_NO_ERROR in init_hardware, 
> and do 
> the detection in init_driver. would this be a good solution, or do 
> any of 
> you kernel guys know a better one?

No, I would have done the same. init_hardware() mostly returns B_OK for 
the drivers I've seen so far, some also check for the correct device to 
be present. Doing the detection in init_driver() seems fine to me.

Adios...
   Axel.


Other related posts: