xref: /illumos-gate/usr/src/man/man9f/usba_hubdi_cb_ops.9f (revision ce326879a41b052db3abafb44e551f9d9c40cdba)
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 May 7, 2016
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 -
53illumos USB HCD private function
54.Pp
55This is a private function that is not part of the stable DDI. It may be
56removed or changed at any time.
57.Sh PARAMATERS
58.Bl -tag -width Fa
59.It Fa dip
60Pointer to the device's
61.Sy dev_info
62structure.
63.El
64.Pp
65All other parameters are the same as the ones described and discussed in
66.Xr open 9E ,
67.Xr ioctl 9E ,
68and
69.Xr close 9E .
70.Sh DESCRIPTION
71The
72.Fn usba_hubdi_open ,
73.Fn usba_hubdi_ioctl ,
74and
75.Fn usba_hubdi_close
76functions are functions provided for the implementation of USB HCD
77drivers. USB HCD drivers are required to implemnt the
78.Xr open 9E ,
79.Xr ioctl 9E ,
80and
81.Xr close 9E
82.Xr cb_ops 9S
83functions. In each of those functions, they should use the device number
84to determine number in
85.Fa devp
86or
87.Fa dev
88to determine the device's corresponding
89.Sy dev_info_t .
90The USB HCD driver's entry points should then call the corresponding
91function described above, passing all the arguments they received
92unmodified.
93.Pp
94The USB HCD driver's entry points should return the value returned by
95the call to the corresponding USBA function.
96.Sh CONTEXT
97These functions should only be called from the context of a USB HCD
98driver's
99.Xr open 9E ,
100.Xr ioctl 9E ,
101and
102.Xr close 9E
103entry points.
104.Sh SEE ALSO
105.Xr close 9E ,
106.Xr ioctl 9E ,
107.Xr open 9E ,
108.Xr usb_hcdi 9E ,
109.Xr cb_ops 9S
110