diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/usb/serial/cp210x.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/usb/serial/cp210x.c')
-rw-r--r-- | drivers/usb/serial/cp210x.c | 45 |
1 files changed, 20 insertions, 25 deletions
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 4f1744c5871f..fd67cc53545b 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c | |||
@@ -41,19 +41,18 @@ static void cp210x_get_termios_port(struct usb_serial_port *port, | |||
41 | unsigned int *cflagp, unsigned int *baudp); | 41 | unsigned int *cflagp, unsigned int *baudp); |
42 | static void cp210x_set_termios(struct tty_struct *, struct usb_serial_port *, | 42 | static void cp210x_set_termios(struct tty_struct *, struct usb_serial_port *, |
43 | struct ktermios*); | 43 | struct ktermios*); |
44 | static int cp210x_tiocmget(struct tty_struct *, struct file *); | 44 | static int cp210x_tiocmget(struct tty_struct *); |
45 | static int cp210x_tiocmset(struct tty_struct *, struct file *, | 45 | static int cp210x_tiocmset(struct tty_struct *, unsigned int, unsigned int); |
46 | unsigned int, unsigned int); | 46 | static int cp210x_tiocmset_port(struct usb_serial_port *port, |
47 | static int cp210x_tiocmset_port(struct usb_serial_port *port, struct file *, | ||
48 | unsigned int, unsigned int); | 47 | unsigned int, unsigned int); |
49 | static void cp210x_break_ctl(struct tty_struct *, int); | 48 | static void cp210x_break_ctl(struct tty_struct *, int); |
50 | static int cp210x_startup(struct usb_serial *); | 49 | static int cp210x_startup(struct usb_serial *); |
51 | static void cp210x_dtr_rts(struct usb_serial_port *p, int on); | 50 | static void cp210x_dtr_rts(struct usb_serial_port *p, int on); |
52 | static int cp210x_carrier_raised(struct usb_serial_port *p); | ||
53 | 51 | ||
54 | static int debug; | 52 | static int debug; |
55 | 53 | ||
56 | static const struct usb_device_id id_table[] = { | 54 | static const struct usb_device_id id_table[] = { |
55 | { USB_DEVICE(0x045B, 0x0053) }, /* Renesas RX610 RX-Stick */ | ||
57 | { USB_DEVICE(0x0471, 0x066A) }, /* AKTAKOM ACE-1001 cable */ | 56 | { USB_DEVICE(0x0471, 0x066A) }, /* AKTAKOM ACE-1001 cable */ |
58 | { USB_DEVICE(0x0489, 0xE000) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */ | 57 | { USB_DEVICE(0x0489, 0xE000) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */ |
59 | { USB_DEVICE(0x0489, 0xE003) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */ | 58 | { USB_DEVICE(0x0489, 0xE003) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */ |
@@ -86,7 +85,6 @@ static const struct usb_device_id id_table[] = { | |||
86 | { USB_DEVICE(0x10C4, 0x8115) }, /* Arygon NFC/Mifare Reader */ | 85 | { USB_DEVICE(0x10C4, 0x8115) }, /* Arygon NFC/Mifare Reader */ |
87 | { USB_DEVICE(0x10C4, 0x813D) }, /* Burnside Telecom Deskmobile */ | 86 | { USB_DEVICE(0x10C4, 0x813D) }, /* Burnside Telecom Deskmobile */ |
88 | { USB_DEVICE(0x10C4, 0x813F) }, /* Tams Master Easy Control */ | 87 | { USB_DEVICE(0x10C4, 0x813F) }, /* Tams Master Easy Control */ |
89 | { USB_DEVICE(0x10C4, 0x8149) }, /* West Mountain Radio Computerized Battery Analyzer */ | ||
90 | { USB_DEVICE(0x10C4, 0x814A) }, /* West Mountain Radio RIGblaster P&P */ | 88 | { USB_DEVICE(0x10C4, 0x814A) }, /* West Mountain Radio RIGblaster P&P */ |
91 | { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */ | 89 | { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */ |
92 | { USB_DEVICE(0x10C4, 0x8156) }, /* B&G H3000 link cable */ | 90 | { USB_DEVICE(0x10C4, 0x8156) }, /* B&G H3000 link cable */ |
@@ -103,15 +101,21 @@ static const struct usb_device_id id_table[] = { | |||
103 | { USB_DEVICE(0x10C4, 0x81F2) }, /* C1007 HF band RFID controller */ | 101 | { USB_DEVICE(0x10C4, 0x81F2) }, /* C1007 HF band RFID controller */ |
104 | { USB_DEVICE(0x10C4, 0x8218) }, /* Lipowsky Industrie Elektronik GmbH, HARP-1 */ | 102 | { USB_DEVICE(0x10C4, 0x8218) }, /* Lipowsky Industrie Elektronik GmbH, HARP-1 */ |
105 | { USB_DEVICE(0x10C4, 0x822B) }, /* Modem EDGE(GSM) Comander 2 */ | 103 | { USB_DEVICE(0x10C4, 0x822B) }, /* Modem EDGE(GSM) Comander 2 */ |
106 | { USB_DEVICE(0x10C4, 0x826B) }, /* Cygnal Integrated Products, Inc., Fasttrax GPS demostration module */ | 104 | { USB_DEVICE(0x10C4, 0x826B) }, /* Cygnal Integrated Products, Inc., Fasttrax GPS demonstration module */ |
107 | { USB_DEVICE(0x10C4, 0x8293) }, /* Telegesys ETRX2USB */ | 105 | { USB_DEVICE(0x10C4, 0x8293) }, /* Telegesis ETRX2USB */ |
108 | { USB_DEVICE(0x10C4, 0x82F9) }, /* Procyon AVS */ | 106 | { USB_DEVICE(0x10C4, 0x82F9) }, /* Procyon AVS */ |
109 | { USB_DEVICE(0x10C4, 0x8341) }, /* Siemens MC35PU GPRS Modem */ | 107 | { USB_DEVICE(0x10C4, 0x8341) }, /* Siemens MC35PU GPRS Modem */ |
110 | { USB_DEVICE(0x10C4, 0x8382) }, /* Cygnal Integrated Products, Inc. */ | 108 | { USB_DEVICE(0x10C4, 0x8382) }, /* Cygnal Integrated Products, Inc. */ |
111 | { USB_DEVICE(0x10C4, 0x83A8) }, /* Amber Wireless AMB2560 */ | 109 | { USB_DEVICE(0x10C4, 0x83A8) }, /* Amber Wireless AMB2560 */ |
110 | { USB_DEVICE(0x10C4, 0x83D8) }, /* DekTec DTA Plus VHF/UHF Booster/Attenuator */ | ||
112 | { USB_DEVICE(0x10C4, 0x8411) }, /* Kyocera GPS Module */ | 111 | { USB_DEVICE(0x10C4, 0x8411) }, /* Kyocera GPS Module */ |
112 | { USB_DEVICE(0x10C4, 0x8418) }, /* IRZ Automation Teleport SG-10 GSM/GPRS Modem */ | ||
113 | { USB_DEVICE(0x10C4, 0x846E) }, /* BEI USB Sensor Interface (VCP) */ | 113 | { USB_DEVICE(0x10C4, 0x846E) }, /* BEI USB Sensor Interface (VCP) */ |
114 | { USB_DEVICE(0x10C4, 0x8477) }, /* Balluff RFID */ | 114 | { USB_DEVICE(0x10C4, 0x8477) }, /* Balluff RFID */ |
115 | { USB_DEVICE(0x10C4, 0x85EA) }, /* AC-Services IBUS-IF */ | ||
116 | { USB_DEVICE(0x10C4, 0x85EB) }, /* AC-Services CIS-IBUS */ | ||
117 | { USB_DEVICE(0x10C4, 0x8664) }, /* AC-Services CAN-IF */ | ||
118 | { USB_DEVICE(0x10C4, 0x8665) }, /* AC-Services OBD-IF */ | ||
115 | { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ | 119 | { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ |
116 | { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ | 120 | { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ |
117 | { USB_DEVICE(0x10C4, 0xEA71) }, /* Infinity GPS-MIC-1 Radio Monophone */ | 121 | { USB_DEVICE(0x10C4, 0xEA71) }, /* Infinity GPS-MIC-1 Radio Monophone */ |
@@ -132,6 +136,7 @@ static const struct usb_device_id id_table[] = { | |||
132 | { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ | 136 | { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ |
133 | { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ | 137 | { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ |
134 | { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ | 138 | { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ |
139 | { USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */ | ||
135 | { USB_DEVICE(0x413C, 0x9500) }, /* DW700 GPS USB interface */ | 140 | { USB_DEVICE(0x413C, 0x9500) }, /* DW700 GPS USB interface */ |
136 | { } /* Terminating Entry */ | 141 | { } /* Terminating Entry */ |
137 | }; | 142 | }; |
@@ -163,8 +168,7 @@ static struct usb_serial_driver cp210x_device = { | |||
163 | .tiocmget = cp210x_tiocmget, | 168 | .tiocmget = cp210x_tiocmget, |
164 | .tiocmset = cp210x_tiocmset, | 169 | .tiocmset = cp210x_tiocmset, |
165 | .attach = cp210x_startup, | 170 | .attach = cp210x_startup, |
166 | .dtr_rts = cp210x_dtr_rts, | 171 | .dtr_rts = cp210x_dtr_rts |
167 | .carrier_raised = cp210x_carrier_raised | ||
168 | }; | 172 | }; |
169 | 173 | ||
170 | /* Config request types */ | 174 | /* Config request types */ |
@@ -697,14 +701,14 @@ static void cp210x_set_termios(struct tty_struct *tty, | |||
697 | 701 | ||
698 | } | 702 | } |
699 | 703 | ||
700 | static int cp210x_tiocmset (struct tty_struct *tty, struct file *file, | 704 | static int cp210x_tiocmset (struct tty_struct *tty, |
701 | unsigned int set, unsigned int clear) | 705 | unsigned int set, unsigned int clear) |
702 | { | 706 | { |
703 | struct usb_serial_port *port = tty->driver_data; | 707 | struct usb_serial_port *port = tty->driver_data; |
704 | return cp210x_tiocmset_port(port, file, set, clear); | 708 | return cp210x_tiocmset_port(port, set, clear); |
705 | } | 709 | } |
706 | 710 | ||
707 | static int cp210x_tiocmset_port(struct usb_serial_port *port, struct file *file, | 711 | static int cp210x_tiocmset_port(struct usb_serial_port *port, |
708 | unsigned int set, unsigned int clear) | 712 | unsigned int set, unsigned int clear) |
709 | { | 713 | { |
710 | unsigned int control = 0; | 714 | unsigned int control = 0; |
@@ -736,12 +740,12 @@ static int cp210x_tiocmset_port(struct usb_serial_port *port, struct file *file, | |||
736 | static void cp210x_dtr_rts(struct usb_serial_port *p, int on) | 740 | static void cp210x_dtr_rts(struct usb_serial_port *p, int on) |
737 | { | 741 | { |
738 | if (on) | 742 | if (on) |
739 | cp210x_tiocmset_port(p, NULL, TIOCM_DTR|TIOCM_RTS, 0); | 743 | cp210x_tiocmset_port(p, TIOCM_DTR|TIOCM_RTS, 0); |
740 | else | 744 | else |
741 | cp210x_tiocmset_port(p, NULL, 0, TIOCM_DTR|TIOCM_RTS); | 745 | cp210x_tiocmset_port(p, 0, TIOCM_DTR|TIOCM_RTS); |
742 | } | 746 | } |
743 | 747 | ||
744 | static int cp210x_tiocmget (struct tty_struct *tty, struct file *file) | 748 | static int cp210x_tiocmget (struct tty_struct *tty) |
745 | { | 749 | { |
746 | struct usb_serial_port *port = tty->driver_data; | 750 | struct usb_serial_port *port = tty->driver_data; |
747 | unsigned int control; | 751 | unsigned int control; |
@@ -763,15 +767,6 @@ static int cp210x_tiocmget (struct tty_struct *tty, struct file *file) | |||
763 | return result; | 767 | return result; |
764 | } | 768 | } |
765 | 769 | ||
766 | static int cp210x_carrier_raised(struct usb_serial_port *p) | ||
767 | { | ||
768 | unsigned int control; | ||
769 | cp210x_get_config(p, CP210X_GET_MDMSTS, &control, 1); | ||
770 | if (control & CONTROL_DCD) | ||
771 | return 1; | ||
772 | return 0; | ||
773 | } | ||
774 | |||
775 | static void cp210x_break_ctl (struct tty_struct *tty, int break_state) | 770 | static void cp210x_break_ctl (struct tty_struct *tty, int break_state) |
776 | { | 771 | { |
777 | struct usb_serial_port *port = tty->driver_data; | 772 | struct usb_serial_port *port = tty->driver_data; |