Copyright (c) 2000, Sun Microsystems, Inc.
All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
#include <sys/conf.h> #include <sys/ddi.h> #include <sys/sunddi.h> static int prefixprobe(dev_info_t *dip);
Pointer to the device's dev_info structure.
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.
If the probe was successful.
If the probe failed.
If the probe was unsuccessful, yet attach(9E) should still be called.
If the instance is not present now, but may be present in the future.
Writing Device Drivers