Re: [RFC] New Driver Model for 2.5

Patrick Mochel
2001-10-18T17:48:52Z

> > probe:
> > Check for device existence and associate driver with it.
>
> What, exactly, does "associate driver" mean? Filling in the struct device
> field, perhaps? Calling register_chrdev (or register_whatever)? Creation
> of a ddfs entry? As a driver writer I can understand that the probe
> routine should check for the existence of some device, and perhaps set up
> an internal data structure. What else happens?

That's basically it. The bus should have already known about the existence
of the device, filled in the fields of struct device and registered it in
the global tree.

As Jeff Garzik suggested:

probe:
register interface
sanity check h/w to make sure it's there and alive
stop DMA/interrupts/etc., just in case
start timer to powerdown h/w in N seconds

in which interface would be your device node (char dev, devfs node, etc).

-pat