Lines Matching refs:serial
54 static int is_irda(struct usb_serial *serial) in is_irda() argument
56 struct usb_device *dev = serial->dev; in is_irda()
81 static int ark3116_write_reg(struct usb_serial *serial, in ark3116_write_reg() argument
86 result = usb_control_msg(serial->dev, in ark3116_write_reg()
87 usb_sndctrlpipe(serial->dev, 0), in ark3116_write_reg()
93 static int ark3116_read_reg(struct usb_serial *serial, in ark3116_read_reg() argument
98 result = usb_control_msg(serial->dev, in ark3116_read_reg()
99 usb_rcvctrlpipe(serial->dev, 0), in ark3116_read_reg()
103 dev_err(&serial->interface->dev, in ark3116_read_reg()
125 static int ark3116_attach(struct usb_serial *serial) in ark3116_attach() argument
128 if ((serial->num_bulk_in == 0) || in ark3116_attach()
129 (serial->num_bulk_out == 0) || in ark3116_attach()
130 (serial->num_interrupt_in == 0)) { in ark3116_attach()
131 dev_err(&serial->dev->dev, in ark3116_attach()
135 serial->num_bulk_in, in ark3116_attach()
136 serial->num_bulk_out, in ark3116_attach()
137 serial->num_interrupt_in); in ark3116_attach()
146 struct usb_serial *serial = port->serial; in ark3116_port_probe() local
156 priv->irda = is_irda(serial); in ark3116_port_probe()
161 ark3116_write_reg(serial, UART_IER, 0); in ark3116_port_probe()
163 ark3116_write_reg(serial, UART_FCR, 0); in ark3116_port_probe()
166 ark3116_write_reg(serial, 0x8 , 0); in ark3116_port_probe()
169 ark3116_write_reg(serial, UART_MCR, 0); in ark3116_port_probe()
172 ark3116_write_reg(serial, 0xb , 0); in ark3116_port_probe()
174 ark3116_write_reg(serial, 0xb , 1); in ark3116_port_probe()
175 ark3116_write_reg(serial, 0xc , 0); in ark3116_port_probe()
176 ark3116_write_reg(serial, 0xd , 0x41); in ark3116_port_probe()
177 ark3116_write_reg(serial, 0xa , 1); in ark3116_port_probe()
181 ark3116_write_reg(serial, UART_LCR, UART_LCR_DLAB); in ark3116_port_probe()
185 ark3116_write_reg(serial, UART_DLL, priv->quot & 0xff); in ark3116_port_probe()
186 ark3116_write_reg(serial, UART_DLM, (priv->quot>>8) & 0xff); in ark3116_port_probe()
189 ark3116_write_reg(serial, UART_LCR, UART_LCR_WLEN8); in ark3116_port_probe()
191 ark3116_write_reg(serial, 0xe, 0); in ark3116_port_probe()
194 ark3116_write_reg(serial, 0x9, 0); in ark3116_port_probe()
196 dev_info(&serial->dev->dev, in ark3116_port_probe()
228 struct usb_serial *serial = port->serial; in ark3116_set_termios() local
299 ark3116_write_reg(serial, 0x8, hcr); in ark3116_set_termios()
310 ark3116_write_reg(serial, UART_FCR, 0); in ark3116_set_termios()
312 ark3116_write_reg(serial, UART_LCR, in ark3116_set_termios()
314 ark3116_write_reg(serial, UART_DLL, quot & 0xff); in ark3116_set_termios()
315 ark3116_write_reg(serial, UART_DLM, (quot>>8) & 0xff); in ark3116_set_termios()
318 ark3116_write_reg(serial, UART_LCR, lcr); in ark3116_set_termios()
322 ark3116_write_reg(serial, 0xe, eval); in ark3116_set_termios()
325 ark3116_write_reg(serial, UART_FCR, UART_FCR_DMA_SELECT); in ark3116_set_termios()
328 ark3116_write_reg(serial, UART_LCR, lcr); in ark3116_set_termios()
335 dev_warn(&serial->dev->dev, in ark3116_set_termios()
347 struct usb_serial *serial = port->serial; in ark3116_close() local
350 ark3116_write_reg(serial, UART_FCR, 0); in ark3116_close()
353 ark3116_write_reg(serial, UART_IER, 0); in ark3116_close()
356 if (serial->num_interrupt_in) in ark3116_close()
363 struct usb_serial *serial = port->serial; in ark3116_open() local
380 ark3116_read_reg(serial, UART_RX, buf); in ark3116_open()
383 result = ark3116_read_reg(serial, UART_MSR, buf); in ark3116_open()
389 result = ark3116_read_reg(serial, UART_LSR, buf); in ark3116_open()
402 ark3116_write_reg(port->serial, UART_IER, UART_IER_MSI|UART_IER_RLSI); in ark3116_open()
405 ark3116_write_reg(port->serial, UART_FCR, UART_FCR_DMA_SELECT); in ark3116_open()
508 ark3116_write_reg(port->serial, UART_MCR, priv->mcr); in ark3116_tiocmset()
528 ark3116_write_reg(port->serial, UART_LCR, priv->lcr); in ark3116_break_ctl()