USB: usb_wwan: fix remote wakeup
[deliverable/linux.git] / drivers / usb / serial / usb-wwan.h
CommitLineData
0d456194
MG
1/*
2 * Definitions for USB serial mobile broadband cards
3 */
4
5#ifndef __LINUX_USB_USB_WWAN
6#define __LINUX_USB_USB_WWAN
7
8extern void usb_wwan_dtr_rts(struct usb_serial_port *port, int on);
9extern int usb_wwan_open(struct tty_struct *tty, struct usb_serial_port *port);
10extern void usb_wwan_close(struct usb_serial_port *port);
b8f0e820 11extern int usb_wwan_port_probe(struct usb_serial_port *port);
a1028f0a 12extern int usb_wwan_port_remove(struct usb_serial_port *port);
0d456194
MG
13extern int usb_wwan_write_room(struct tty_struct *tty);
14extern void usb_wwan_set_termios(struct tty_struct *tty,
15 struct usb_serial_port *port,
16 struct ktermios *old);
60b33c13 17extern int usb_wwan_tiocmget(struct tty_struct *tty);
20b9d177 18extern int usb_wwan_tiocmset(struct tty_struct *tty,
0d456194 19 unsigned int set, unsigned int clear);
00a0d0d6 20extern int usb_wwan_ioctl(struct tty_struct *tty,
02303f73 21 unsigned int cmd, unsigned long arg);
0d456194
MG
22extern int usb_wwan_send_setup(struct usb_serial_port *port);
23extern int usb_wwan_write(struct tty_struct *tty, struct usb_serial_port *port,
24 const unsigned char *buf, int count);
25extern int usb_wwan_chars_in_buffer(struct tty_struct *tty);
26#ifdef CONFIG_PM
27extern int usb_wwan_suspend(struct usb_serial *serial, pm_message_t message);
28extern int usb_wwan_resume(struct usb_serial *serial);
29#endif
30
31/* per port private data */
32
33#define N_IN_URB 4
34#define N_OUT_URB 4
35#define IN_BUFLEN 4096
36#define OUT_BUFLEN 4096
37
38struct usb_wwan_intf_private {
39 spinlock_t susp_lock;
40 unsigned int suspended:1;
41 int in_flight;
c1c01803 42 unsigned int open_ports;
0d456194
MG
43 int (*send_setup) (struct usb_serial_port *port);
44 void *private;
45};
46
47struct usb_wwan_port_private {
48 /* Input endpoints and buffer for this port */
49 struct urb *in_urbs[N_IN_URB];
50 u8 *in_buffer[N_IN_URB];
51 /* Output endpoints and buffer for this port */
52 struct urb *out_urbs[N_OUT_URB];
53 u8 *out_buffer[N_OUT_URB];
54 unsigned long out_busy; /* Bit vector of URBs in use */
55 int opened;
56 struct usb_anchor delayed;
57
58 /* Settings for the port */
59 int rts_state; /* Handshaking pins (outputs) */
60 int dtr_state;
61 int cts_state; /* Handshaking pins (inputs) */
62 int dsr_state;
63 int dcd_state;
64 int ri_state;
65
66 unsigned long tx_start_time[N_OUT_URB];
67};
68
69#endif /* __LINUX_USB_USB_WWAN */
This page took 0.292061 seconds and 5 git commands to generate.