Home
last modified time | relevance | path

Searched refs:rs485 (Results 1 – 24 of 24) sorted by relevance

/drivers/tty/serial/8250/
D8250_dwlib.c138 static void dw8250_rs485_set_addr(struct uart_port *p, struct serial_rs485 *rs485, in dw8250_rs485_set_addr() argument
143 if (rs485->flags & SER_RS485_ADDRB) { in dw8250_rs485_set_addr()
148 if (rs485->flags & SER_RS485_ADDR_RECV) { in dw8250_rs485_set_addr()
149 u32 delta = p->rs485.flags ^ rs485->flags; in dw8250_rs485_set_addr()
155 if (unlikely(&p->rs485 == rs485)) in dw8250_rs485_set_addr()
156 delta = rs485->flags; in dw8250_rs485_set_addr()
159 (p->rs485.addr_recv != rs485->addr_recv)) in dw8250_rs485_set_addr()
160 dw8250_update_rar(p, rs485->addr_recv); in dw8250_rs485_set_addr()
165 if (rs485->flags & SER_RS485_ADDR_DEST) { in dw8250_rs485_set_addr()
171 dw8250_writel_ext(p, DW_UART_TAR, rs485->addr_dest); in dw8250_rs485_set_addr()
[all …]
D8250_fintek.c195 struct serial_rs485 *rs485) in fintek_8250_rs485_config() argument
204 if (rs485->flags & SER_RS485_ENABLED) { in fintek_8250_rs485_config()
206 if (!(rs485->flags & SER_RS485_RTS_ON_SEND) == in fintek_8250_rs485_config()
207 !(rs485->flags & SER_RS485_RTS_AFTER_SEND)) in fintek_8250_rs485_config()
212 if (rs485->delay_rts_before_send) { in fintek_8250_rs485_config()
213 rs485->delay_rts_before_send = 1; in fintek_8250_rs485_config()
217 if (rs485->delay_rts_after_send) { in fintek_8250_rs485_config()
218 rs485->delay_rts_after_send = 1; in fintek_8250_rs485_config()
222 if (rs485->flags & SER_RS485_RTS_ON_SEND) in fintek_8250_rs485_config()
D8250_lpc18xx.c36 struct serial_rs485 *rs485) in lpc18xx_rs485_config() argument
43 if (rs485->flags & SER_RS485_ENABLED) { in lpc18xx_rs485_config()
47 if (rs485->flags & SER_RS485_RTS_ON_SEND) in lpc18xx_rs485_config()
51 if (rs485->delay_rts_after_send) { in lpc18xx_rs485_config()
53 rs485_dly_reg = DIV_ROUND_UP(rs485->delay_rts_after_send in lpc18xx_rs485_config()
60 rs485->delay_rts_after_send = (rs485_dly_reg * MSEC_PER_SEC) in lpc18xx_rs485_config()
D8250_bcm2835aux.c54 if (!(up->port.rs485.flags & SER_RS485_RX_DURING_TX)) { in bcm2835aux_rs485_start_tx()
65 if (up->port.rs485.flags & SER_RS485_RTS_ON_SEND) in bcm2835aux_rs485_start_tx()
73 if (up->port.rs485.flags & SER_RS485_RTS_AFTER_SEND) in bcm2835aux_rs485_stop_tx()
78 if (!(up->port.rs485.flags & SER_RS485_RX_DURING_TX)) { in bcm2835aux_rs485_stop_tx()
D8250_pci1xxxx.c169 struct serial_rs485 *rs485) in pci1xxxx_rs485_config() argument
180 if (rs485->flags & SER_RS485_ENABLED) { in pci1xxxx_rs485_config()
183 if (!(rs485->flags & SER_RS485_RTS_ON_SEND)) in pci1xxxx_rs485_config()
186 if (rs485->delay_rts_after_send) { in pci1xxxx_rs485_config()
192 rs485->delay_rts_after_send * NSEC_PER_MSEC / in pci1xxxx_rs485_config()
199 rs485->delay_rts_after_send = in pci1xxxx_rs485_config()
D8250_exar.c168 struct serial_rs485 *rs485);
470 struct serial_rs485 *rs485) in generic_rs485_config() argument
472 bool is_rs485 = !!(rs485->flags & SER_RS485_ENABLED); in generic_rs485_config()
502 struct serial_rs485 *rs485) in iot2040_rs485_config() argument
504 bool is_rs485 = !!(rs485->flags & SER_RS485_ENABLED); in iot2040_rs485_config()
510 if (rs485->flags & SER_RS485_RX_DURING_TX) in iot2040_rs485_config()
515 if (rs485->flags & SER_RS485_TERMINATE_BUS) in iot2040_rs485_config()
531 return generic_rs485_config(port, termios, rs485); in iot2040_rs485_config()
D8250_port.c622 struct serial_rs485 *rs485) in serial8250_em485_config() argument
627 if (!!(rs485->flags & SER_RS485_RTS_ON_SEND) == in serial8250_em485_config()
628 !!(rs485->flags & SER_RS485_RTS_AFTER_SEND)) { in serial8250_em485_config()
629 rs485->flags |= SER_RS485_RTS_ON_SEND; in serial8250_em485_config()
630 rs485->flags &= ~SER_RS485_RTS_AFTER_SEND; in serial8250_em485_config()
637 if (rs485->flags & SER_RS485_ENABLED) in serial8250_em485_config()
1411 if (p->port.rs485.flags & SER_RS485_RTS_AFTER_SEND) in serial8250_em485_stop_tx()
1422 if (!(p->port.rs485.flags & SER_RS485_RX_DURING_TX)) { in serial8250_em485_stop_tx()
1463 stop_delay += (u64)p->port.rs485.delay_rts_after_send * NSEC_PER_MSEC; in __stop_tx_rs485()
1573 if (!(up->port.rs485.flags & SER_RS485_RX_DURING_TX)) in serial8250_em485_start_tx()
[all …]
D8250_omap.c366 if (up->port.rs485.flags & SER_RS485_ENABLED && in omap8250_restore_regs()
841 struct serial_rs485 *rs485) in omap8250_rs485_config() argument
876 rs485->delay_rts_after_send > fixed_delay_rts_after_send || in omap8250_rs485_config()
877 rs485->delay_rts_before_send > fixed_delay_rts_before_send) { in omap8250_rs485_config()
882 return serial8250_em485_config(port, termios, rs485); in omap8250_rs485_config()
885 rs485->delay_rts_after_send = fixed_delay_rts_after_send; in omap8250_rs485_config()
886 rs485->delay_rts_before_send = fixed_delay_rts_before_send; in omap8250_rs485_config()
888 if (rs485->flags & SER_RS485_ENABLED) in omap8250_rs485_config()
897 if (rs485->flags & SER_RS485_RTS_ON_SEND) in omap8250_rs485_config()
D8250.h212 struct serial_rs485 *rs485);
D8250_core.c1064 uart->port.rs485 = up->port.rs485; in serial8250_register_8250_port()
D8250_pci.c1536 struct serial_rs485 *rs485) in pci_fintek_rs485_config() argument
1544 if (rs485->flags & SER_RS485_ENABLED) { in pci_fintek_rs485_config()
1548 if (rs485->flags & SER_RS485_RTS_ON_SEND) { in pci_fintek_rs485_config()
/drivers/usb/serial/
Dxr_serial.c241 struct serial_rs485 rs485; member
651 rs485_enabled = !!(data->rs485.flags & SER_RS485_ENABLED); in xr_set_flow_mode()
655 if (data->rs485.flags & SER_RS485_RTS_ON_SEND) in xr_set_flow_mode()
825 static void xr_sanitize_serial_rs485(struct serial_rs485 *rs485) in xr_sanitize_serial_rs485() argument
827 if (!(rs485->flags & SER_RS485_ENABLED)) { in xr_sanitize_serial_rs485()
828 memset(rs485, 0, sizeof(*rs485)); in xr_sanitize_serial_rs485()
833 if (rs485->flags & SER_RS485_RTS_ON_SEND) in xr_sanitize_serial_rs485()
834 rs485->flags &= ~SER_RS485_RTS_AFTER_SEND; in xr_sanitize_serial_rs485()
836 rs485->flags |= SER_RS485_RTS_AFTER_SEND; in xr_sanitize_serial_rs485()
839 rs485->flags &= SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND | in xr_sanitize_serial_rs485()
[all …]
/drivers/tty/serial/
Dserial_core.c185 if (old != port->mctrl && !(port->rs485.flags & SER_RS485_ENABLED)) in uart_update_mctrl()
1325 static int uart_check_rs485_flags(struct uart_port *port, struct serial_rs485 *rs485) in uart_check_rs485_flags() argument
1327 u32 flags = rs485->flags; in uart_check_rs485_flags()
1340 if (!(rs485->flags & SER_RS485_ADDRB) && in uart_check_rs485_flags()
1341 (rs485->flags & (SER_RS485_ADDR_RECV|SER_RS485_ADDR_DEST))) in uart_check_rs485_flags()
1345 if (!(rs485->flags & SER_RS485_ADDR_RECV) && rs485->addr_recv) in uart_check_rs485_flags()
1347 if (!(rs485->flags & SER_RS485_ADDR_DEST) && rs485->addr_dest) in uart_check_rs485_flags()
1354 struct serial_rs485 *rs485) in uart_sanitize_serial_rs485_delays() argument
1357 if (rs485->delay_rts_before_send) { in uart_sanitize_serial_rs485_delays()
1362 rs485->delay_rts_before_send = 0; in uart_sanitize_serial_rs485_delays()
[all …]
Domap-serial.c285 if (port->rs485.flags & SER_RS485_ENABLED) { in serial_omap_stop_tx()
296 res = (port->rs485.flags & SER_RS485_RTS_AFTER_SEND) ? in serial_omap_stop_tx()
299 if (port->rs485.delay_rts_after_send > 0) in serial_omap_stop_tx()
301 port->rs485.delay_rts_after_send); in serial_omap_stop_tx()
338 if ((up->port.rs485.flags & SER_RS485_ENABLED) && in serial_omap_put_char()
339 !(up->port.rs485.flags & SER_RS485_RX_DURING_TX)) in serial_omap_put_char()
367 if (port->rs485.flags & SER_RS485_ENABLED) { in serial_omap_start_tx()
373 res = (port->rs485.flags & SER_RS485_RTS_ON_SEND) ? 1 : 0; in serial_omap_start_tx()
376 if (port->rs485.delay_rts_before_send > 0) in serial_omap_start_tx()
377 mdelay(port->rs485.delay_rts_before_send); in serial_omap_start_tx()
[all …]
Dmax310x.c1040 delay = (one->port.rs485.delay_rts_before_send << 4) | in max310x_rs_proc()
1041 one->port.rs485.delay_rts_after_send; in max310x_rs_proc()
1044 if (one->port.rs485.flags & SER_RS485_ENABLED) { in max310x_rs_proc()
1047 if (!(one->port.rs485.flags & SER_RS485_RX_DURING_TX)) in max310x_rs_proc()
1058 struct serial_rs485 *rs485) in max310x_rs485_config() argument
1062 if ((rs485->delay_rts_before_send > 0x0f) || in max310x_rs485_config()
1063 (rs485->delay_rts_after_send > 0x0f)) in max310x_rs485_config()
1066 port->rs485 = *rs485; in max310x_rs485_config()
1091 val = (clamp(port->rs485.delay_rts_before_send, 0U, 15U) << 4) | in max310x_startup()
1092 clamp(port->rs485.delay_rts_after_send, 0U, 15U); in max310x_startup()
[all …]
Dimx.c437 if (port->rs485.flags & SER_RS485_ENABLED) { in imx_uart_stop_tx()
441 if (port->rs485.delay_rts_after_send > 0) { in imx_uart_stop_tx()
443 port->rs485.delay_rts_after_send); in imx_uart_stop_tx()
457 if (port->rs485.flags & SER_RS485_RTS_AFTER_SEND) in imx_uart_stop_tx()
493 if (port->rs485.flags & SER_RS485_ENABLED && in imx_uart_stop_rx_with_loopback_ctrl()
494 port->rs485.flags & SER_RS485_RTS_ON_SEND && in imx_uart_stop_rx_with_loopback_ctrl()
608 else if (sport->port.rs485.flags & SER_RS485_ENABLED) { in imx_uart_dma_tx_callback()
693 if (port->rs485.flags & SER_RS485_ENABLED) { in imx_uart_start_tx()
696 if (port->rs485.flags & SER_RS485_RTS_ON_SEND) in imx_uart_start_tx()
707 if (!(port->rs485.flags & SER_RS485_RX_DURING_TX) && in imx_uart_start_tx()
[all …]
Dmcf.c102 if (port->rs485.flags & SER_RS485_ENABLED) { in mcf_start_tx()
256 if (port->rs485.flags & SER_RS485_ENABLED) { in mcf_set_termios()
338 if (!pending && (port->rs485.flags & SER_RS485_ENABLED)) in mcf_tx_chars()
417 struct serial_rs485 *rs485) in mcf_config_rs485() argument
424 if (rs485->flags & SER_RS485_ENABLED) { in mcf_config_rs485()
Dsc16is7xx.c821 if ((port->rs485.flags & SER_RS485_ENABLED) && in sc16is7xx_tx_proc()
822 (port->rs485.delay_rts_before_send > 0)) in sc16is7xx_tx_proc()
823 msleep(port->rs485.delay_rts_before_send); in sc16is7xx_tx_proc()
835 struct serial_rs485 *rs485 = &port->rs485; in sc16is7xx_reconf_rs485() local
839 if (rs485->flags & SER_RS485_ENABLED) { in sc16is7xx_reconf_rs485()
842 if (rs485->flags & SER_RS485_RTS_AFTER_SEND) in sc16is7xx_reconf_rs485()
1126 struct serial_rs485 *rs485) in sc16is7xx_config_rs485() argument
1131 if (rs485->flags & SER_RS485_ENABLED) { in sc16is7xx_config_rs485()
1137 if (rs485->delay_rts_after_send) in sc16is7xx_config_rs485()
Damba-pl011.c1306 if (port->rs485.delay_rts_after_send) in pl011_rs485_tx_stop()
1307 mdelay(port->rs485.delay_rts_after_send); in pl011_rs485_tx_stop()
1311 if (port->rs485.flags & SER_RS485_RTS_AFTER_SEND) in pl011_rs485_tx_stop()
1333 if ((port->rs485.flags & SER_RS485_ENABLED) && uap->rs485_tx_started) in pl011_stop_tx()
1358 if (!(port->rs485.flags & SER_RS485_RX_DURING_TX)) in pl011_rs485_tx_start()
1361 if (port->rs485.flags & SER_RS485_RTS_ON_SEND) in pl011_rs485_tx_start()
1368 if (port->rs485.delay_rts_before_send) in pl011_rs485_tx_start()
1369 mdelay(port->rs485.delay_rts_before_send); in pl011_rs485_tx_start()
1379 if ((uap->port.rs485.flags & SER_RS485_ENABLED) && in pl011_start_tx()
1866 if (!(port->rs485.flags & SER_RS485_ENABLED)) in pl011_startup()
[all …]
Dar933x_uart.c394 struct serial_rs485 *rs485conf = &up->port.rs485; in ar933x_uart_tx_chars()
588 if (port->rs485.flags & SER_RS485_ENABLED) in ar933x_config_rs485()
799 if (port->rs485.flags & SER_RS485_ENABLED) { in ar933x_uart_probe()
801 port->rs485.flags &= ~SER_RS485_ENABLED; in ar933x_uart_probe()
Dfsl_lpuart.c1454 struct serial_rs485 *rs485) in lpuart_config_rs485() argument
1463 if (rs485->flags & SER_RS485_ENABLED) { in lpuart_config_rs485()
1473 if (rs485->flags & SER_RS485_RTS_ON_SEND) in lpuart_config_rs485()
1475 else if (rs485->flags & SER_RS485_RTS_AFTER_SEND) in lpuart_config_rs485()
1484 struct serial_rs485 *rs485) in lpuart32_config_rs485() argument
1493 if (rs485->flags & SER_RS485_ENABLED) { in lpuart32_config_rs485()
1503 if (rs485->flags & SER_RS485_RTS_ON_SEND) in lpuart32_config_rs485()
1505 else if (rs485->flags & SER_RS485_RTS_AFTER_SEND) in lpuart32_config_rs485()
2025 if (sport->port.rs485.flags & SER_RS485_ENABLED) in lpuart_set_termios()
2260 if (sport->port.rs485.flags & SER_RS485_ENABLED) in lpuart32_set_termios()
Dstm32-usart.c148 struct serial_rs485 *rs485conf = &port->rs485; in stm32_usart_rs485_rts_enable()
166 struct serial_rs485 *rs485conf = &port->rs485; in stm32_usart_rs485_rts_disable()
278 struct serial_rs485 *rs485conf = &port->rs485; in stm32_usart_init_rs485()
796 port->rs485.flags & SER_RS485_ENABLED && in stm32_usart_transmit_chars()
846 port->rs485.flags & SER_RS485_ENABLED) { in stm32_usart_transmit_chars()
865 port->rs485.flags & SER_RS485_ENABLED && in stm32_usart_interrupt()
1155 struct serial_rs485 *rs485conf = &port->rs485; in stm32_usart_set_termios()
Datmel_serial.c228 return ((port->rs485.flags & SER_RS485_ENABLED) && in atmel_uart_is_half_duplex()
229 !(port->rs485.flags & SER_RS485_RX_DURING_TX)) || in atmel_uart_is_half_duplex()
477 if (port->rs485.flags & SER_RS485_ENABLED) { in atmel_set_mctrl()
479 port->rs485.delay_rts_after_send); in atmel_set_mctrl()
2223 if (port->rs485.flags & SER_RS485_ENABLED) { in atmel_set_termios()
2225 port->rs485.delay_rts_after_send); in atmel_set_termios()
2956 rs485_enabled = atmel_port->uart.rs485.flags & SER_RS485_ENABLED; in atmel_serial_probe()
/drivers/comedi/
DKconfig875 digital interface rs485 boards PCI-HPDI32 and PMC-HPDI32.