device_if.m (46913) | device_if.m (47178) |
---|---|
1# 2# Copyright (c) 1998 Doug Rabson 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions 7# are met: 8# 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24# SUCH DAMAGE. 25# | 1# 2# Copyright (c) 1998 Doug Rabson 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions 7# are met: 8# 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24# SUCH DAMAGE. 25# |
26# $Id: device_if.m,v 1.3 1998/11/14 21:58:51 wollman Exp $ | 26# $Id: device_if.m,v 1.4 1999/05/10 17:06:13 dfr Exp $ |
27# 28 29INTERFACE device; 30 31# 32# Default implementations of some methods. 33# 34CODE { --- 35 unchanged lines hidden (view full) --- 70# children. If this is combined with the use of bus_generic_attach, 71# the child devices will be automatically probed and attached. 72# 73METHOD int probe { 74 device_t dev; 75}; 76 77# | 27# 28 29INTERFACE device; 30 31# 32# Default implementations of some methods. 33# 34CODE { --- 35 unchanged lines hidden (view full) --- 70# children. If this is combined with the use of bus_generic_attach, 71# the child devices will be automatically probed and attached. 72# 73METHOD int probe { 74 device_t dev; 75}; 76 77# |
78# Called by a parent bus to add new devices to the bus. 79# 80STATICMETHOD void identify { 81 driver_t *driver; 82 device_t parent; 83}; 84 85# |
|
78# Attach a device to the system. The probe method will have been 79# called and will have indicated that the device exists. This routine 80# should initialise the hardware and allocate other system resources 81# (such as devfs entries). Returns 0 on success. 82# 83METHOD int attach { 84 device_t dev; 85}; --- 31 unchanged lines hidden --- | 86# Attach a device to the system. The probe method will have been 87# called and will have indicated that the device exists. This routine 88# should initialise the hardware and allocate other system resources 89# (such as devfs entries). Returns 0 on success. 90# 91METHOD int attach { 92 device_t dev; 93}; --- 31 unchanged lines hidden --- |