Date: Tue, 16 May 2000 20:29:46 +0200 From: Alexander Langer <alex@big.endian.de> To: doc@freebsd.org, newbus@freebsd.org Subject: DRIVER_MODULE(9) Message-ID: <20000516202946.A29889@cichlids.cichlids.com>
next in thread | raw e-mail | index | archive | help
--XsQoSWH+UP9D9v3l Content-Type: text/plain; charset=us-ascii Attached is a new manpage for the important macro DRIVER_MODULE(9) which everyone knows :-) Please review it (also language fixes, please). Most important is the evh part (which I'm not sure of) and of course arg. Please give me hints. Thanks Alex -- I need a new ~/.sig. --XsQoSWH+UP9D9v3l Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="DRIVER_MODULE.9" .\" -*- nroff -*- .\" .\" Copyright (c) 2000 Alexander Langer .\" .\" All rights reserved. .\" .\" This program is free software. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd May 16, 2000 .Dt DRIVER_MODULE 9 .Os FreeBSD .Sh NAME .Nm DRIVER_MODULE .Nd a C macro for FreeBSD kernel drivers .Sh SYNOPSIS .Fd #include <sys/bus.h> .Fn DRIVER_MODULE "name" "busname" "driver_t driver" "devclass_t devclass" "int (*evh) (struct module *, int, void *)" "void *arg" .Sh DESCRIPTION .Fn DRIVER_MODULE is a big macro that is used in the .Fx driver system. In fact, .Fn DRIVER_MODULE expands to the real driver itself, which can be easily hidden to the programmer this way. It is a nice example how newbus hides its complexity to the programmer. .Pp .Ft name is expanded into parts of the names of the driver, so it is just text (not! a .Va char or .Va char * ). Actually, it is how the driver later on is referenced as. .Pp .Ft busname is the parent bus of the driver (PCI, ISA, PPBUS) and is, as an example, .Ar pci or .Ar isa . .Pp .Ft driver is the driver of type .Va driver_t , which carries the information about your driver and is so far one of the two most important parts of the call to .Fn DRIVER_MODULE . .Pp .Ft devclass carries the kernel-internal information about the device, which you are supposed to use in your module. .Pp .Ft evh is the event handler which is called when the driver (or module) is loaded or unloaded. .Pp .Ft arg is .Dv NULL in all drivers in the tree at time of writing. .Sh AUTHORS This man page was written by .An Alexander Langer <alex@big.endian.de> . --XsQoSWH+UP9D9v3l-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000516202946.A29889>