2 * driver_ops.h 1.13 1999/08/28 04:12:33
4 * The contents of this file are subject to the Mozilla Public License
5 * Version 1.1 (the "License"); you may not use this file except in
6 * compliance with the License. You may obtain a copy of the License
7 * at http://www.mozilla.org/MPL/
9 * Software distributed under the License is distributed on an "AS IS"
10 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
11 * the License for the specific language governing rights and
12 * limitations under the License.
14 * The initial developer of the original code is David A. Hinds
15 * <dhinds@hyper.stanford.edu>. Portions created by David A. Hinds
16 * are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
18 * Alternatively, the contents of this file may be used under the
19 * terms of the GNU Public License version 2 (the "GPL"), in which
20 * case the provisions of the GPL are applicable instead of the
21 * above. If you wish to allow the use of your version of this file
22 * only under the terms of the GPL and not to allow others to use
23 * your version of this file under the MPL, indicate your decision by
24 * deleting the provisions above and replace them with the notice and
25 * other provisions required by the GPL. If you do not delete the
26 * provisions above, a recipient may use your version of this file
27 * under either the MPL or the GPL.
30 #ifndef _LINUX_DRIVER_OPS_H
31 #define _LINUX_DRIVER_OPS_H
34 #define DEV_NAME_LEN 32
39 typedef struct dev_node_t
{
40 char dev_name
[DEV_NAME_LEN
];
42 struct dev_node_t
*next
;
45 typedef struct dev_locator_t
{
46 enum { LOC_ISA
, LOC_PCI
} bus
;
49 u_short io_base_1
, io_base_2
;
60 typedef struct driver_operations
{
62 dev_node_t
*(*attach
) (dev_locator_t
*loc
);
63 void (*suspend
) (dev_node_t
*dev
);
64 void (*resume
) (dev_node_t
*dev
);
65 void (*detach
) (dev_node_t
*dev
);
68 int register_driver(struct driver_operations
*ops
);
69 void unregister_driver(struct driver_operations
*ops
);
72 #define CB_ENABLER_MODULE_NAME "bus_managers/cb_enabler/v1"
73 typedef struct cb_enabler_module_info
{
74 bus_manager_info binfo
;
75 int (*register_driver
)(struct driver_operations
*ops
);
76 void (*unregister_driver
)(struct driver_operations
*ops
);
77 } cb_enabler_module_info
;
80 #endif /* __KERNEL__ */
82 #endif /* _LINUX_DRIVER_OPS_H */