]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man9/superio.9
disk(9): Fix a few mandoc related errors
[FreeBSD/FreeBSD.git] / share / man / man9 / superio.9
1 .\"
2 .\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 .\"
4 .\" Copyright (c) 2019 Andriy Gapon <avg@FreeBSD.org>
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\"
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 .\" SUCH DAMAGE.
26 .\"
27 .\" $FreeBSD$
28 .\"
29 .Dd October 11, 2019
30 .Dt SUPERIO 9
31 .Os
32 .Sh NAME
33 .Nm superio ,
34 .Nm superio_devid ,
35 .Nm superio_dev_disable ,
36 .Nm superio_dev_enable ,
37 .Nm superio_dev_enabled ,
38 .Nm superio_find_dev ,
39 .Nm superio_get_dma ,
40 .Nm superio_get_iobase ,
41 .Nm superio_get_irq ,
42 .Nm superio_get_ldn ,
43 .Nm superio_get_type ,
44 .Nm superio_read ,
45 .Nm superio_revid ,
46 .Nm superio_vendor ,
47 .Nm superio_write
48 .Nd Super I/O bus interface
49 .Sh SYNOPSIS
50 .In sys/bus.h
51 .In dev/superio/superio.h
52 .Ft uint16_t
53 .Fn superio_devid "device_t dev"
54 .Ft void
55 .Fn superio_dev_disable "device_t dev" "uint8_t mask"
56 .Ft void
57 .Fn superio_dev_enable "device_t dev" "uint8_t mask"
58 .Ft bool
59 .Fn superio_dev_enabled "device_t dev" "uint8_t mask"
60 .Ft device_t
61 .Fn superio_find_dev "device_t dev" "superio_dev_type_t type" "int ldn"
62 .Ft uint8_t
63 .Fn superio_get_dma "device_t dev"
64 .Ft uint16_t
65 .Fn superio_get_iobase "device_t dev"
66 .Ft uint8_t
67 .Fn superio_get_irq "device_t dev"
68 .Ft uint8_t
69 .Fn superio_get_ldn "device_t dev"
70 .Ft superio_dev_type_t
71 .Fn superio_get_type "device_t dev"
72 .Ft uint8_t
73 .Fn superio_read "device_t dev" "uint8_t reg"
74 .Ft uint8_t
75 .Fn superio_revid "device_t dev"
76 .Ft superio_vendor_t
77 .Fn superio_vendor "device_t dev"
78 .Ft void
79 .Fn superio_write "device_t dev" "uint8_t reg" "uint8_t val"
80 .Sh DESCRIPTION
81 The
82 .Nm
83 set of functions are used for managing Super I/O devices.
84 The functions provide support for
85 raw configuration access,
86 locating devices,
87 device information,
88 and
89 device configuration.
90 .Ss The controller interface
91 The
92 .Fn superio_vendor
93 function is used to get a vendor of the Super I/O controller
94 .Fa dev .
95 Possible return values are
96 .Dv SUPERIO_VENDOR_ITE
97 and
98 .Dv SUPERIO_VENDOR_NUVOTON .
99 .Pp
100 The
101 .Fn superio_devid
102 function is used to get a device ID of the Super I/O controller
103 .Fa dev .
104 .Pp
105 The
106 .Fn superio_revid
107 function is used to get a revision ID of the Super I/O controller
108 .Fa dev .
109 .Pp
110 The
111 .Fn superio_find_dev
112 function is used to find a device on the
113 .Xr superio 4
114 bus, specified by
115 .Fa dev ,
116 that has the requested type and logical device number.
117 Either of those, but not both, can be a wildcard.
118 Supported types are
119 .Dv SUPERIO_DEV_GPIO ,
120 .Dv SUPERIO_DEV_HWM ,
121 and
122 .Dv SUPERIO_DEV_WDT .
123 The wildcard value for
124 .Fa type
125 is
126 .Dv SUPERIO_DEV_NONE .
127 The wildcard value for
128 .Fa ldn
129 is -1.
130 .Ss The device interface
131 The
132 .Fn superio_read
133 function is used to read data from the Super I/O configuration register
134 of the device
135 .Fa dev .
136 .Pp
137 The
138 .Fn superio_write
139 function is used to write data to the Super I/O configuration register
140 of the device
141 .Fa dev .
142 .Pp
143 The
144 .Fn superio_dev_enable ,
145 .Fn superio_dev_disable ,
146 and
147 .Fn superio_dev_enabled
148 functions are used to enable, disable, or check status of the device
149 .Fa dev .
150 The
151 .Fa mask
152 parameter selects sub-functions of a device that supports them.
153 For devices that do not have sub-functions,
154 .Fa mask
155 should be set to 1.
156 .Ss The accessor interface
157 The
158 .Fn superio_get_dma
159 is used to get a DMA channel number configured for the device
160 .Fa dev .
161 .Pp
162 The
163 .Fn superio_get_iobase
164 is used to get a base I/O port configured for the device
165 .Fa dev .
166 The device may expose additional or alternative configuration access via
167 the I/O ports.
168 .Pp
169 The
170 .Fn superio_get_irq
171 is used to get an interrupt number configured for the device
172 .Fa dev .
173 .Pp
174 The
175 .Fn superio_get_ldn
176 is used to get a Logical Device Number of the device
177 .Fa dev .
178 .Pp
179 The
180 .Fn superio_get_type
181 is used to get a type of the device
182 .Fa dev .
183 .Sh SEE ALSO
184 .Xr superio 4 ,
185 .Xr device 9 ,
186 .Xr driver 9
187 .Sh AUTHORS
188 This manual page was written by
189 .An Andriy Gapon Mt avg@FreeBSD.org