diff options
author | Srikant Patnaik | 2015-01-13 15:08:24 +0530 |
---|---|---|
committer | Srikant Patnaik | 2015-01-13 15:08:24 +0530 |
commit | 97327692361306d1e6259021bc425e32832fdb50 (patch) | |
tree | fe9088f3248ec61e24f404f21b9793cb644b7f01 /drivers/usb/serial/via_usb-wwan.h | |
parent | 2d05a8f663478a44e088d122e0d62109bbc801d0 (diff) | |
parent | a3a8b90b61e21be3dde9101c4e86c881e0f06210 (diff) | |
download | FOSSEE-netbook-kernel-source-97327692361306d1e6259021bc425e32832fdb50.tar.gz FOSSEE-netbook-kernel-source-97327692361306d1e6259021bc425e32832fdb50.tar.bz2 FOSSEE-netbook-kernel-source-97327692361306d1e6259021bc425e32832fdb50.zip |
dirty fix to merging
Diffstat (limited to 'drivers/usb/serial/via_usb-wwan.h')
-rwxr-xr-x | drivers/usb/serial/via_usb-wwan.h | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/drivers/usb/serial/via_usb-wwan.h b/drivers/usb/serial/via_usb-wwan.h new file mode 100755 index 00000000..415b74c6 --- /dev/null +++ b/drivers/usb/serial/via_usb-wwan.h @@ -0,0 +1,88 @@ +/* + * Definitions for USB serial mobile broadband cards + */ + +#ifndef __LINUX_USB_USB_WWAN +#define __LINUX_USB_USB_WWAN + +#define CONFIG_VIATELECOM_SYNC_CBP 1 +#define CONFIG_USB_ANDROID_RAWBULK 1 + + + +extern void usb_wwan_dtr_rts(struct usb_serial_port *port, int on); +extern int usb_wwan_open(struct tty_struct *tty, struct usb_serial_port *port); +extern void usb_wwan_close(struct usb_serial_port *port); +extern int usb_wwan_startup(struct usb_serial *serial); +extern void usb_wwan_disconnect(struct usb_serial *serial); +extern void usb_wwan_release(struct usb_serial *serial); +extern int usb_wwan_write_room(struct tty_struct *tty); +extern void usb_wwan_set_termios(struct tty_struct *tty, + struct usb_serial_port *port, + struct ktermios *old); +extern int usb_wwan_tiocmget(struct tty_struct *tty); +extern int usb_wwan_tiocmset(struct tty_struct *tty, + unsigned int set, unsigned int clear); +extern int usb_wwan_ioctl(struct tty_struct *tty, + unsigned int cmd, unsigned long arg); +extern int usb_wwan_send_setup(struct usb_serial_port *port); +extern int usb_wwan_write(struct tty_struct *tty, struct usb_serial_port *port, + const unsigned char *buf, int count); +extern int usb_wwan_chars_in_buffer(struct tty_struct *tty); +#ifdef CONFIG_PM +extern int usb_wwan_suspend(struct usb_serial *serial, pm_message_t message); +extern int usb_wwan_resume(struct usb_serial *serial); +#endif + +/* per port private data */ + +#define N_IN_URB 8 +#define N_OUT_URB 16 +#define IN_BUFLEN 4096 +#define OUT_BUFLEN 4096 + +#define MAX_IN_URBS 16 +#define MAX_OUT_URBS 16 + +struct usb_wwan_intf_private { + spinlock_t susp_lock; + struct usb_device *udev; + struct notifier_block pm_nb; + unsigned int suspended:1; + int in_flight; + int (*send_setup) (struct usb_serial_port *port); + void *private; +}; + +struct usb_wwan_port_private { + /* Input endpoints and buffer for this port */ + unsigned int n_in_urb; + unsigned int in_buflen; + struct urb *in_urbs[MAX_IN_URBS]; + u8 *in_buffer[MAX_IN_URBS]; + /* Output endpoints and buffer for this port */ + unsigned int n_out_urb; + unsigned int out_buflen; + struct urb *out_urbs[MAX_OUT_URBS]; + u8 *out_buffer[MAX_OUT_URBS]; + unsigned long out_busy; /* Bit vector of URBs in use */ + int opened; + struct usb_anchor delayed; + + /* Settings for the port */ + int rts_state; /* Handshaking pins (outputs) */ + int dtr_state; + int cts_state; /* Handshaking pins (inputs) */ + int dsr_state; + int dcd_state; + int ri_state; + + unsigned long tx_start_time[MAX_OUT_URBS]; + +#ifdef CONFIG_USB_ANDROID_RAWBULK + spinlock_t incept_lock; + unsigned int inception:1; +#endif +}; + +#endif /* __LINUX_USB_USB_WWAN */ |