No empty .Rs/.Re
[netbsd-mini2440.git] / sys / dev / usb / umodemvar.h
blobff3697758df8b74048ceb16f7601253682366490
1 /* $NetBSD: umodemvar.h,v 1.6 2008/02/18 05:24:24 dyoung Exp $ */
3 /*
4 * Copyright (c) 1998 The NetBSD Foundation, Inc.
5 * All rights reserved.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Lennart Augustsson (lennart@augustsson.net) at
9 * Carlstedt Research & Technology.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
20 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE.
33 struct umodem_softc {
34 USBBASEDEVICE sc_dev; /* base device */
36 usbd_device_handle sc_udev; /* USB device */
38 int sc_ctl_iface_no;
39 usbd_interface_handle sc_ctl_iface; /* control interface */
40 int sc_data_iface_no;
41 usbd_interface_handle sc_data_iface; /* data interface */
43 int sc_cm_cap; /* CM capabilities */
44 int sc_acm_cap; /* ACM capabilities */
46 int sc_cm_over_data;
48 usb_cdc_line_state_t sc_line_state; /* current line state */
49 u_char sc_dtr; /* current DTR state */
50 u_char sc_rts; /* current RTS state */
52 device_ptr_t sc_subdev; /* ucom device */
54 u_char sc_opening; /* lock during open */
55 u_char sc_dying; /* disconnecting */
57 int sc_ctl_notify; /* Notification endpoint */
58 usbd_pipe_handle sc_notify_pipe; /* Notification pipe */
59 usb_cdc_notification_t sc_notify_buf; /* Notification structure */
60 u_char sc_lsr; /* Local status register */
61 u_char sc_msr; /* Modem status register */
64 void umodem_common_childdet(struct umodem_softc *, device_t);
65 int umodem_common_attach(device_ptr_t, struct umodem_softc *,
66 struct usbif_attach_arg *, struct ucom_attach_args *);
68 int umodem_get_caps(usbd_device_handle, int *, int *,
69 usb_interface_descriptor_t *);
71 void umodem_get_status(void *, int portno, u_char *lsr, u_char *msr);
72 void umodem_set(void *, int, int, int);
73 int umodem_param(void *, int, struct termios *);
74 int umodem_ioctl(void *, int, u_long, void *, int, usb_proc_ptr);
75 int umodem_open(void *, int portno);
76 void umodem_close(void *, int portno);
77 int umodem_common_activate(struct umodem_softc *, enum devact);
78 int umodem_common_detach(struct umodem_softc *, int);