]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - share/man/man9/BUS_CONFIG_INTR.9
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / share / man / man9 / BUS_CONFIG_INTR.9
1 .\" Copyright (c) 2003 Marcel Moolenaar
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\"
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\" SUCH DAMAGE.
25 .\"
26 .\" $FreeBSD$
27 .\"
28 .Dd January 6, 2005
29 .Dt BUS_CONFIG_INTR 9
30 .Os
31 .\"
32 .Sh NAME
33 .Nm BUS_CONFIG_INTR
34 .Nd "configure interrupt polarity and trigger mode"
35 .\"
36 .Sh SYNOPSIS
37 .In sys/param.h
38 .In sys/bus.h
39 .Ft int
40 .Fo BUS_CONFIG_INTR
41 .Fa "device_t dev" "int irq" "enum intr_trigger trig" "enum intr_polarity pol"
42 .Fc
43 .\"
44 .Sh DESCRIPTION
45 The
46 .Fn BUS_CONFIG_INTR
47 method allows bus or device drivers to provide interrupt polarity and trigger
48 mode to parent busses.
49 This typically bubbles all the way up to the root bus (e.g.\& nexus) where the
50 necessary actions are taken to actually program the hardware.
51 Since the
52 .Fn BUS_CONFIG_INTR
53 method takes an interrupt number, it is assumed but not necessarily required
54 that it is called prior to
55 .Xr BUS_SETUP_INTR 9 .
56 .Pp
57 The
58 .Fa trig
59 argument can be one of:
60 .Bl -tag -width ".Dv INTR_TRIGGER_CONFORM"
61 .It Dv INTR_TRIGGER_CONFORM
62 The interrupt trigger mode is standard for the bus to which the device is
63 attached.
64 .It Dv INTR_TRIGGER_EDGE
65 The interrupt is edge triggered.
66 This means that the interrupt is raised by the rising edge of the signal on
67 the interrupt line.
68 The signal typically reverts to the original state so as to cause a spike.
69 .It Dv INTR_TRIGGER_LEVEL
70 The interrupt is level triggered.
71 This means that the interrupt is raised when the signal on the interrupt line
72 transitions and remains unchanged after that until the interrupt has been
73 serviced, after which the signal transitions back.
74 .El
75 .Pp
76 The
77 .Fa pol
78 argument can be any one of:
79 .Bl -tag -width ".Dv INTR_POLARITY_CONFORM"
80 .It Dv INTR_POLARITY_CONFORM
81 The interrupt polarity is standard for the bus to which the device is attached.
82 .It Dv INTR_POLARITY_HIGH
83 The interrupt is activated by a high voltage on the interrupt line.
84 .It Dv INTR_POLARITY_LOW
85 The interrupt is activated by a low voltage on the interrupt line.
86 .El
87 .\"
88 .Sh RETURN VALUES
89 Zero is returned on success, otherwise an appropriate error is returned.
90 .\"
91 .Sh SEE ALSO
92 .Xr BUS_SETUP_INTR 9 ,
93 .Xr BUS_TEARDOWN_INTR 9 ,
94 .Xr device 9 ,
95 .Xr driver 9
96 .\"
97 .Sh HISTORY
98 The
99 .Fn BUS_CONFIG_INTR
100 method first appeared in
101 .Fx 5.2 .
102 .\"
103 .Sh AUTHORS
104 This manual page was written by
105 .An Marcel Moolenaar
106 .Aq marcel@xcllnt.net .