xref: /freebsd/share/man/man9/devclass.9 (revision 22ea1ec051c15659944bf3922c33ec4025d010ea)
1cefd51ecSDoug Rabson.\" -*- nroff -*-
2cefd51ecSDoug Rabson.\"
3cefd51ecSDoug Rabson.\" Copyright (c) 1998 Doug Rabson
4cefd51ecSDoug Rabson.\"
5cefd51ecSDoug Rabson.\" All rights reserved.
6cefd51ecSDoug Rabson.\"
7cefd51ecSDoug Rabson.\" This program is free software.
8cefd51ecSDoug Rabson.\"
9cefd51ecSDoug Rabson.\" Redistribution and use in source and binary forms, with or without
10cefd51ecSDoug Rabson.\" modification, are permitted provided that the following conditions
11cefd51ecSDoug Rabson.\" are met:
12cefd51ecSDoug Rabson.\" 1. Redistributions of source code must retain the above copyright
13cefd51ecSDoug Rabson.\"    notice, this list of conditions and the following disclaimer.
14cefd51ecSDoug Rabson.\" 2. Redistributions in binary form must reproduce the above copyright
15cefd51ecSDoug Rabson.\"    notice, this list of conditions and the following disclaimer in the
16cefd51ecSDoug Rabson.\"    documentation and/or other materials provided with the distribution.
17cefd51ecSDoug Rabson.\"
18cefd51ecSDoug Rabson.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
19cefd51ecSDoug Rabson.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20cefd51ecSDoug Rabson.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21cefd51ecSDoug Rabson.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
22cefd51ecSDoug Rabson.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23cefd51ecSDoug Rabson.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24cefd51ecSDoug Rabson.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25cefd51ecSDoug Rabson.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26cefd51ecSDoug Rabson.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27cefd51ecSDoug Rabson.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28cefd51ecSDoug Rabson.\"
29cefd51ecSDoug Rabson.Dd June 16, 1998
30def37e7cSMike Pritchard.Dt DEVCLASS 9
313d45e180SRuslan Ermilov.Os
32cefd51ecSDoug Rabson.Sh NAME
33cefd51ecSDoug Rabson.Nm devclass
34cefd51ecSDoug Rabson.Nd object representing a class of devices
35a04dd748SMike Pritchard.Sh SYNOPSIS
36d0353b83SRuslan Ermilov.Vt typedef struct devclass *devclass_t ;
37cefd51ecSDoug Rabson.Sh DESCRIPTION
38cefd51ecSDoug RabsonThe
39f8801468SRuslan Ermilov.Vt devclass
40a0942a60SHiten Pandyaobject has two main functions in the system.
41a0942a60SHiten PandyaThe first is to manage
42cefd51ecSDoug Rabsonthe allocation of unit numbers for device instances and the second is
43cefd51ecSDoug Rabsonto hold the list of device drivers for a particular bus type.
44cefd51ecSDoug RabsonEach
45f8801468SRuslan Ermilov.Vt devclass
46cefd51ecSDoug Rabsonhas a name and there cannot be two devclasses with the same name.
47cefd51ecSDoug RabsonThis ensures that unique unit numbers are allocated to device
48cefd51ecSDoug Rabsoninstances.
49*22ea1ec0SWarner LoshAll instances with the same name are treated as being the same.
5023209510SDaniel C. Sobral.Pp
51*22ea1ec0SWarner LoshWhen no specific unit number is needed,
52*22ea1ec0SWarner Losh.Vt DEVICE_UNIT_ANY
53*22ea1ec0SWarner Loshis used.
54cefd51ecSDoug Rabson.Sh SEE ALSO
55cefd51ecSDoug Rabson.Xr devclass_add_driver 9 ,
56cefd51ecSDoug Rabson.Xr devclass_delete_driver 9 ,
57def37e7cSMike Pritchard.Xr devclass_find 9 ,
58cefd51ecSDoug Rabson.Xr devclass_find_driver 9 ,
59cefd51ecSDoug Rabson.Xr devclass_get_device 9 ,
60cefd51ecSDoug Rabson.Xr devclass_get_devices 9 ,
61def37e7cSMike Pritchard.Xr devclass_get_maxunit 9 ,
62def37e7cSMike Pritchard.Xr devclass_get_name 9 ,
63def37e7cSMike Pritchard.Xr devclass_get_softc 9 ,
64def37e7cSMike Pritchard.Xr device 9 ,
65def37e7cSMike Pritchard.Xr driver 9
66cefd51ecSDoug Rabson.Sh AUTHORS
67571dba6eSHiten PandyaThis manual page was written by
68cefd51ecSDoug Rabson.An Doug Rabson .
69