xref: /illumos-gate/usr/src/man/man9f/usba_hubdi_cb_ops.9f (revision 8119dad84d6416f13557b0ba8e2aaf9064cbcfd3)
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 -
53illumos USB HCD private function
54.Pp
55This is a private function that is not part of the stable DDI.
56It may be removed or changed at any time.
57.Sh PARAMETERS
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.
78USB HCD drivers are required to implemnt the
79.Xr open 9E ,
80.Xr ioctl 9E ,
81and
82.Xr close 9E
83.Xr cb_ops 9S
84functions.
85In each of those functions, they should use the device number to determine
86number in
87.Fa devp
88or
89.Fa dev
90to determine the device's corresponding
91.Sy dev_info_t .
92The USB HCD driver's entry points should then call the corresponding
93function described above, passing all the arguments they received
94unmodified.
95.Pp
96The USB HCD driver's entry points should return the value returned by
97the call to the corresponding USBA function.
98.Sh CONTEXT
99These functions should only be called from the context of a USB HCD
100driver's
101.Xr open 9E ,
102.Xr ioctl 9E ,
103and
104.Xr close 9E
105entry 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
112