2 .\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD
4 .\" Copyright (c) 2019 Andriy Gapon <avg@FreeBSD.org>
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
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.
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
35 .Nm superio_dev_disable ,
36 .Nm superio_dev_enable ,
37 .Nm superio_dev_enabled ,
38 .Nm superio_find_dev ,
40 .Nm superio_get_iobase ,
43 .Nm superio_get_type ,
48 .Nd Super I/O bus interface
51 .In dev/superio/superio.h
53 .Fn superio_devid "device_t dev"
55 .Fn superio_dev_disable "device_t dev" "uint8_t mask"
57 .Fn superio_dev_enable "device_t dev" "uint8_t mask"
59 .Fn superio_dev_enabled "device_t dev" "uint8_t mask"
61 .Fn superio_find_dev "device_t dev" "superio_dev_type_t type" "int ldn"
63 .Fn superio_get_dma "device_t dev"
65 .Fn superio_get_iobase "device_t dev"
67 .Fn superio_get_irq "device_t dev"
69 .Fn superio_get_ldn "device_t dev"
70 .Ft superio_dev_type_t
71 .Fn superio_get_type "device_t dev"
73 .Fn superio_read "device_t dev" "uint8_t reg"
75 .Fn superio_revid "device_t dev"
77 .Fn superio_vendor "device_t dev"
79 .Fn superio_write "device_t dev" "uint8_t reg" "uint8_t val"
83 set of functions are used for managing Super I/O devices.
84 The functions provide support for
85 raw configuration access,
90 .Ss The controller interface
93 function is used to get a vendor of the Super I/O controller
95 Possible return values are
96 .Dv SUPERIO_VENDOR_ITE
98 .Dv SUPERIO_VENDOR_NUVOTON .
102 function is used to get a device ID of the Super I/O controller
107 function is used to get a revision ID of the Super I/O controller
112 function is used to find a device on the
116 that has the requested type and logical device number.
117 Either of those, but not both, can be a wildcard.
119 .Dv SUPERIO_DEV_GPIO ,
120 .Dv SUPERIO_DEV_HWM ,
122 .Dv SUPERIO_DEV_WDT .
123 The wildcard value for
126 .Dv SUPERIO_DEV_NONE .
127 The wildcard value for
130 .Ss The device interface
133 function is used to read data from the Super I/O configuration register
139 function is used to write data to the Super I/O configuration register
144 .Fn superio_dev_enable ,
145 .Fn superio_dev_disable ,
147 .Fn superio_dev_enabled
148 functions are used to enable, disable, or check status of the device
152 parameter selects sub-functions of a device that supports them.
153 For devices that do not have sub-functions,
156 .Ss The accessor interface
159 is used to get a DMA channel number configured for the device
163 .Fn superio_get_iobase
164 is used to get a base I/O port configured for the device
166 The device may expose additional or alternative configuration access via
171 is used to get an interrupt number configured for the device
176 is used to get a Logical Device Number of the device
181 is used to get a type of the device
188 This manual page was written by
189 .An Andriy Gapon Mt avg@FreeBSD.org