1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (c) 2012 GCT Semiconductor, Inc. All rights reserved. */
7 #include <linux/types.h>
9 #include <linux/list.h>
16 #define USB_RT_ACM (USB_TYPE_CLASS | USB_RECIP_INTERFACE)
18 #define START_FLAG 0xA512485A
19 #define MUX_HEADER_SIZE 14
20 #define MUX_TX_MAX_SIZE (1024 * 10)
21 #define MUX_RX_MAX_SIZE (1024 * 30)
22 #define AT_PKT_TYPE 0xF011
23 #define DM_PKT_TYPE 0xF010
25 #define RETRY_TIMER 30 /* msec */
27 struct mux_pkt_header {
39 void (*callback)(void *cb_data);
44 struct list_head free_list;
45 struct list_head rx_submit_list;
46 struct list_head to_host_list;
52 int (*callback)(void *data,
55 struct tty_dev *tty_dev,
60 struct list_head to_host_list;
61 struct list_head rx_submit_list;
62 struct list_head rx_free_list;
63 spinlock_t to_host_lock;
64 spinlock_t submit_list_lock;
65 spinlock_t free_list_lock;
69 struct usb_device *usbdev;
70 struct usb_interface *control_intf;
71 struct usb_interface *data_intf;
73 struct delayed_work work_rx;
74 struct usb_interface *intf;
76 int (*rx_cb)(void *data,
79 struct tty_dev *tty_dev,
81 spinlock_t write_lock;
82 struct tty_dev *tty_dev;
85 #endif /* _GDM_MUX_H_ */