Unleashed v1.4
[unleashed.git] / share / man / man9f / usba_hubdi_cb_ops.9f
blob79fa5996d4ba0afe64cb681c24ee97ac91b9312a
1 .\"
2 .\" This file and its contents are supplied under the terms of the
3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 .\" You may only use this file in accordance with the terms of version
5 .\" 1.0 of the CDDL.
6 .\"
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source.  A copy of the CDDL is also available via the Internet at
9 .\" http://www.illumos.org/license/CDDL.
10 .\"
11 .\"
12 .\" Copyright 2016 Joyent, Inc.
13 .\"
14 .Dd Nov 26, 2017
15 .Dt USBA_HCDI_CB_OPS 9F
16 .Os
17 .Sh NAME
18 .Nm usba_hubdi_cb_ops ,
19 .Nm usba_hubdi_open ,
20 .Nm usba_hubdi_ioctl ,
21 .Nm usba_hubdi_close
22 .Nd character device utility functions for HCD drivers
23 .Sh SYNOPSIS
24 .In sys/usb/usba/hubdi.h
25 .Ft int
26 .Fo usba_hubdi_open
27 .Fa "dev_info_t *dip"
28 .Fa "dev_t *devp"
29 .Fa "int flag"
30 .Fa "int otyp"
31 .Fa "cred_t *cred_p"
32 .Fc
33 .Ft int
34 .Fo usba_hubdi_ioctl
35 .Fa "dev_info_t *dip"
36 .Fa "dev_t dev"
37 .Fa "int flag"
38 .Fa "intptr_t arg"
39 .Fa "int mode"
40 .Fa "cred_t *cred_pp"
41 .Fa "int *rval_p"
42 .Fc
43 .Ft int
44 .Fo usba_hubdi_close
45 .Fa "dev_info_t *dip"
46 .Fa "dev_t dev"
47 .Fa "int flag"
48 .Fa "int otyp"
49 .Fa "cred_t *cred_p"
50 .Fc
51 .Sh INTERFACE LEVEL
52 .Sy Volatile -
53 illumos USB HCD private function
54 .Pp
55 This is a private function that is not part of the stable DDI.
56 It may be removed or changed at any time.
57 .Sh PARAMETERS
58 .Bl -tag -width Fa
59 .It Fa dip
60 Pointer to the device's
61 .Sy dev_info
62 structure.
63 .El
64 .Pp
65 All other parameters are the same as the ones described and discussed in
66 .Xr open 9E ,
67 .Xr ioctl 9E ,
68 and
69 .Xr close 9E .
70 .Sh DESCRIPTION
71 The
72 .Fn usba_hubdi_open ,
73 .Fn usba_hubdi_ioctl ,
74 and
75 .Fn usba_hubdi_close
76 functions are functions provided for the implementation of USB HCD
77 drivers.
78 USB HCD drivers are required to implemnt the
79 .Xr open 9E ,
80 .Xr ioctl 9E ,
81 and
82 .Xr close 9E
83 .Xr cb_ops 9S
84 functions.
85 In each of those functions, they should use the device number to determine
86 number in
87 .Fa devp
89 .Fa dev
90 to determine the device's corresponding
91 .Sy dev_info_t .
92 The USB HCD driver's entry points should then call the corresponding
93 function described above, passing all the arguments they received
94 unmodified.
95 .Pp
96 The USB HCD driver's entry points should return the value returned by
97 the call to the corresponding USBA function.
98 .Sh CONTEXT
99 These functions should only be called from the context of a USB HCD
100 driver's
101 .Xr open 9E ,
102 .Xr ioctl 9E ,
104 .Xr close 9E
105 entry points.
106 .Sh SEE ALSO
107 .Xr close 9E ,
108 .Xr ioctl 9E ,
109 .Xr open 9E ,
110 .Xr usba_hcdi 9E ,
111 .Xr cb_ops 9S