|PROBE(9E)||Driver Entry Points||PROBE(9E)|
#include <sys/conf.h> #include <sys/ddi.h> #include <sys/sunddi.h> static int prefixprobe(dev_info_t *dip);
To probe a device that was left powered off after the last detach(), it might be necessary to power it up. If so, the driver must power up the device by accessing device registers directly. pm_raise_power(9F) will be not be available until attach(9E). The framework ensures that the ancestors of the node being probed and all relevant platform-specific power management hardware is at full power at the time that probe() is called.
probe() should only probe the device. It should not change any software state and should not create any software state. Device initialization should be done in attach(9E).
For a self-identifying device, this entry point is not necessary. However, if a device exists in both self-identifying and non-self-identifying forms, a probe() routine can be provided to simplify the driver. ddi_dev_is_sid(9F) can then be used to determine whether probe() needs to do any work. See ddi_dev_is_sid(9F) for an example.
Writing Device Drivers
|February 15, 2020||OmniOS|