Subject: Re: Abstracting pckbc(4)
To: Ben Harris <bjh21@NetBSD.org>
From: Lennart Augustsson <lennart@augustsson.net>
List: tech-kern
Date: 02/02/2004 17:28:44
Yes, and then there is also activate.  Activate is typically called
from interrupt context when the controller notices that a device
is gone.  And then there is usually a thread that calls detach later.

You can look at the USB drivers, or SCSI drivers for examples (though
convoluted :)

	-- Lennart

Ben Harris wrote:
> On Mon, 2 Feb 2004, Lennart Augustsson wrote:
> 
> 
>>Hot plug doesn't work (as far as I know), but you should design the
>>extra abstraction so it could.  Just make sure to propagate the
>>detach and activate calls that (presumably) comes from the controller.
> 
> 
> So the model would be that the controller driver would call the midlayer
> when it noticed a new device, and the midlayer would call
> config_found_sm(), and similarly the controller driver would call the
> midlayer when a device went away, and the midlayer would call
> config_detach().  Is that correct?
>