Searched refs:rs485 (Results 1 - 19 of 19) sorted by relevance

/linux-4.4.14/drivers/tty/serial/8250/
H A D8250_fintek.c92 struct serial_rs485 *rs485) fintek_8250_rs485_config()
100 if (rs485->flags & SER_RS485_ENABLED) fintek_8250_rs485_config()
101 memset(rs485->padding, 0, sizeof(rs485->padding)); fintek_8250_rs485_config()
103 memset(rs485, 0, sizeof(*rs485)); fintek_8250_rs485_config()
105 rs485->flags &= SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND | fintek_8250_rs485_config()
108 if (rs485->delay_rts_before_send) { fintek_8250_rs485_config()
109 rs485->delay_rts_before_send = 1; fintek_8250_rs485_config()
113 if (rs485->delay_rts_after_send) { fintek_8250_rs485_config()
114 rs485->delay_rts_after_send = 1; fintek_8250_rs485_config()
118 if ((!!(rs485->flags & SER_RS485_RTS_ON_SEND)) == fintek_8250_rs485_config()
119 (!!(rs485->flags & SER_RS485_RTS_AFTER_SEND))) fintek_8250_rs485_config()
120 rs485->flags &= SER_RS485_ENABLED; fintek_8250_rs485_config()
124 if (rs485->flags & SER_RS485_RTS_ON_SEND) fintek_8250_rs485_config()
136 port->rs485 = *rs485; fintek_8250_rs485_config()
91 fintek_8250_rs485_config(struct uart_port *port, struct serial_rs485 *rs485) fintek_8250_rs485_config() argument
H A D8250_lpc18xx.c40 struct serial_rs485 *rs485) lpc18xx_rs485_config()
47 if (rs485->flags & SER_RS485_ENABLED) lpc18xx_rs485_config()
48 memset(rs485->padding, 0, sizeof(rs485->padding)); lpc18xx_rs485_config()
50 memset(rs485, 0, sizeof(*rs485)); lpc18xx_rs485_config()
52 rs485->flags &= SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND | lpc18xx_rs485_config()
55 if (rs485->flags & SER_RS485_ENABLED) { lpc18xx_rs485_config()
59 if (rs485->flags & SER_RS485_RTS_ON_SEND) { lpc18xx_rs485_config()
61 rs485->flags &= ~SER_RS485_RTS_AFTER_SEND; lpc18xx_rs485_config()
63 rs485->flags |= SER_RS485_RTS_AFTER_SEND; lpc18xx_rs485_config()
67 if (rs485->delay_rts_after_send) { lpc18xx_rs485_config()
69 rs485_dly_reg = DIV_ROUND_UP(rs485->delay_rts_after_send lpc18xx_rs485_config()
76 rs485->delay_rts_after_send = (rs485_dly_reg * MSEC_PER_SEC) lpc18xx_rs485_config()
81 rs485->delay_rts_before_send = 0; lpc18xx_rs485_config()
86 port->rs485 = *rs485; lpc18xx_rs485_config()
39 lpc18xx_rs485_config(struct uart_port *port, struct serial_rs485 *rs485) lpc18xx_rs485_config() argument
H A D8250_pci.c1545 struct serial_rs485 *rs485) pci_fintek_rs485_config()
1554 if (!rs485) pci_fintek_rs485_config()
1555 rs485 = &port->rs485; pci_fintek_rs485_config()
1556 else if (rs485->flags & SER_RS485_ENABLED) pci_fintek_rs485_config()
1557 memset(rs485->padding, 0, sizeof(rs485->padding)); pci_fintek_rs485_config()
1559 memset(rs485, 0, sizeof(*rs485)); pci_fintek_rs485_config()
1562 rs485->flags &= SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND; pci_fintek_rs485_config()
1564 if (rs485->flags & SER_RS485_ENABLED) { pci_fintek_rs485_config()
1568 if (rs485->flags & SER_RS485_RTS_ON_SEND) { pci_fintek_rs485_config()
1576 rs485->delay_rts_after_send = 0; pci_fintek_rs485_config()
1577 rs485->delay_rts_before_send = 0; pci_fintek_rs485_config()
1585 if (rs485 != &port->rs485) pci_fintek_rs485_config()
1586 port->rs485 = *rs485; pci_fintek_rs485_config()
1544 pci_fintek_rs485_config(struct uart_port *port, struct serial_rs485 *rs485) pci_fintek_rs485_config() argument
H A D8250_core.c990 uart->port.rs485 = up->port.rs485; serial8250_register_8250_port()
/linux-4.4.14/include/linux/platform_data/
H A Datmel.h51 struct serial_rs485 rs485; /* rs485 settings */ member in struct:atmel_uart_data
/linux-4.4.14/arch/cris/include/uapi/asm/
H A Dtermios.h6 #include <asm/rs485.h>
/linux-4.4.14/drivers/tty/serial/
H A Domap-serial.c303 if (port->rs485.flags & SER_RS485_ENABLED) { serial_omap_stop_tx()
314 res = (port->rs485.flags & SER_RS485_RTS_AFTER_SEND) ? serial_omap_stop_tx()
317 if (port->rs485.delay_rts_after_send > 0) serial_omap_stop_tx()
319 port->rs485.delay_rts_after_send); serial_omap_stop_tx()
342 if ((port->rs485.flags & SER_RS485_ENABLED) && serial_omap_stop_tx()
343 !(port->rs485.flags & SER_RS485_RX_DURING_TX)) { serial_omap_stop_tx()
418 if (port->rs485.flags & SER_RS485_ENABLED) { serial_omap_start_tx()
424 res = (port->rs485.flags & SER_RS485_RTS_ON_SEND) ? 1 : 0; serial_omap_start_tx()
427 if (port->rs485.delay_rts_before_send > 0) serial_omap_start_tx()
428 mdelay(port->rs485.delay_rts_before_send); serial_omap_start_tx()
432 if ((port->rs485.flags & SER_RS485_ENABLED) && serial_omap_start_tx()
433 !(port->rs485.flags & SER_RS485_RX_DURING_TX)) serial_omap_start_tx()
1344 /* Enable or disable the rs485 support */
1346 serial_omap_config_rs485(struct uart_port *port, struct serial_rs485 *rs485) serial_omap_config_rs485() argument
1360 rs485->delay_rts_before_send = min(rs485->delay_rts_before_send, 100U); serial_omap_config_rs485()
1361 rs485->delay_rts_after_send = min(rs485->delay_rts_after_send, 100U); serial_omap_config_rs485()
1364 port->rs485 = *rs485; serial_omap_config_rs485()
1367 * Just as a precaution, only allow rs485 serial_omap_config_rs485()
1372 val = (port->rs485.flags & SER_RS485_ENABLED) ? serial_omap_config_rs485()
1374 val = (port->rs485.flags & val) ? 1 : 0; serial_omap_config_rs485()
1377 port->rs485.flags &= ~SER_RS485_ENABLED; serial_omap_config_rs485()
1386 if (!(port->rs485.flags & SER_RS485_ENABLED) && serial_omap_config_rs485()
1551 struct serial_rs485 *rs485conf = &up->port.rs485; serial_omap_probe_rs485()
1562 if (of_property_read_bool(np, "rs485-rts-active-high")) serial_omap_probe_rs485()
1583 if (of_property_read_u32_array(np, "rs485-rts-delay", serial_omap_probe_rs485()
1589 if (of_property_read_bool(np, "rs485-rx-during-tx")) serial_omap_probe_rs485()
1592 if (of_property_read_bool(np, "linux,rs485-enabled-at-boot-time")) serial_omap_probe_rs485()
H A Dmcf.c106 if (port->rs485.flags & SER_RS485_ENABLED) { mcf_start_tx()
260 if (port->rs485.flags & SER_RS485_ENABLED) { mcf_set_termios()
361 if (port->rs485.flags & SER_RS485_ENABLED) mcf_tx_chars()
441 static int mcf_config_rs485(struct uart_port *port, struct serial_rs485 *rs485) mcf_config_rs485() argument
448 if (rs485->flags & SER_RS485_ENABLED) { mcf_config_rs485()
458 port->rs485 = *rs485; mcf_config_rs485()
H A Dsc16is7xx.c713 if ((port->rs485.flags & SER_RS485_ENABLED) && sc16is7xx_tx_proc()
714 (port->rs485.delay_rts_before_send > 0)) sc16is7xx_tx_proc()
715 msleep(port->rs485.delay_rts_before_send); sc16is7xx_tx_proc()
725 struct serial_rs485 *rs485 = &port->rs485; sc16is7xx_reconf_rs485() local
729 if (rs485->flags & SER_RS485_ENABLED) { sc16is7xx_reconf_rs485()
732 if (rs485->flags & SER_RS485_RTS_AFTER_SEND) sc16is7xx_reconf_rs485()
918 struct serial_rs485 *rs485) sc16is7xx_config_rs485()
923 if (rs485->flags & SER_RS485_ENABLED) { sc16is7xx_config_rs485()
926 rts_during_rx = rs485->flags & SER_RS485_RTS_AFTER_SEND; sc16is7xx_config_rs485()
927 rts_during_tx = rs485->flags & SER_RS485_RTS_ON_SEND; sc16is7xx_config_rs485()
939 if (rs485->delay_rts_after_send) sc16is7xx_config_rs485()
943 port->rs485 = *rs485; sc16is7xx_config_rs485()
917 sc16is7xx_config_rs485(struct uart_port *port, struct serial_rs485 *rs485) sc16is7xx_config_rs485() argument
H A Dmax310x.c881 struct serial_rs485 *rs485) max310x_rs485_config()
885 if (rs485->delay_rts_before_send > 0x0f || max310x_rs485_config()
886 rs485->delay_rts_after_send > 0x0f) max310x_rs485_config()
889 val = (rs485->delay_rts_before_send << 4) | max310x_rs485_config()
890 rs485->delay_rts_after_send; max310x_rs485_config()
892 if (rs485->flags & SER_RS485_ENABLED) { max310x_rs485_config()
906 rs485->flags &= SER_RS485_RTS_ON_SEND | SER_RS485_ENABLED; max310x_rs485_config()
907 memset(rs485->padding, 0, sizeof(rs485->padding)); max310x_rs485_config()
908 port->rs485 = *rs485; max310x_rs485_config()
880 max310x_rs485_config(struct uart_port *port, struct serial_rs485 *rs485) max310x_rs485_config() argument
H A Dcrisv10.h113 struct serial_rs485 rs485; /* RS-485 support */ member in struct:e100_serial
H A Datmel_serial.c331 /* Enable or disable the rs485 support */ atmel_config_rs485()
346 port->rs485 = *rs485conf; atmel_config_rs485()
391 if (port->rs485.flags & SER_RS485_ENABLED) { atmel_set_mctrl()
393 port->rs485.delay_rts_after_send); atmel_set_mctrl()
476 if ((port->rs485.flags & SER_RS485_ENABLED) && atmel_stop_tx()
477 !(port->rs485.flags & SER_RS485_RX_DURING_TX)) atmel_stop_tx()
494 if ((port->rs485.flags & SER_RS485_ENABLED) && atmel_start_tx()
495 !(port->rs485.flags & SER_RS485_RX_DURING_TX)) atmel_start_tx()
904 if (port->rs485.flags & SER_RS485_ENABLED) { atmel_tx_dma()
1375 if ((port->rs485.flags & SER_RS485_ENABLED) && atmel_tx_pdc()
1376 !(port->rs485.flags & SER_RS485_RX_DURING_TX)) { atmel_tx_pdc()
1692 struct serial_rs485 *rs485conf = &port->rs485; atmel_init_rs485()
1694 /* rs485 properties */ atmel_init_rs485()
1695 if (of_property_read_u32_array(np, "rs485-rts-delay", atmel_init_rs485()
1702 if (of_get_property(np, "rs485-rx-during-tx", NULL)) atmel_init_rs485()
1705 if (of_get_property(np, "linux,rs485-enabled-at-boot-time", atmel_init_rs485()
1709 port->rs485 = pdata->rs485; atmel_init_rs485()
2173 if (port->rs485.flags & SER_RS485_ENABLED) { atmel_set_termios()
2175 port->rs485.delay_rts_after_send); atmel_set_termios()
2426 /* Use TXEMPTY for interrupt when rs485 else TXRDY or ENDTX|TXBUFE */ atmel_init_port()
2427 if (port->rs485.flags & SER_RS485_ENABLED) atmel_init_port()
2822 rs485_enabled = port->uart.rs485.flags & SER_RS485_ENABLED; atmel_serial_probe()
H A Dimx.c374 /* in rs485 mode disable transmitter if shifter is empty */ imx_stop_tx()
375 if (port->rs485.flags & SER_RS485_ENABLED && imx_stop_tx()
378 if (port->rs485.flags & SER_RS485_RTS_AFTER_SEND) imx_stop_tx()
581 if (port->rs485.flags & SER_RS485_ENABLED) { imx_start_tx()
584 if (port->rs485.flags & SER_RS485_RTS_ON_SEND) imx_start_tx()
826 if (!(port->rs485.flags & SER_RS485_ENABLED)) { imx_set_mctrl()
1312 if (port->rs485.flags & SER_RS485_ENABLED) { imx_set_termios()
1314 * RTS is mandatory for rs485 operation, so keep imx_set_termios()
1318 if (!(port->rs485.flags & imx_set_termios()
1327 } else if (port->rs485.flags & SER_RS485_ENABLED) imx_set_termios()
1329 if (!(port->rs485.flags & SER_RS485_RTS_AFTER_SEND)) imx_set_termios()
1579 port->rs485 = *rs485conf; imx_rs485_config()
1944 sport->port.rs485.flags = serial_imx_probe()
H A Dcrisv10.c1340 info->rs485 = *r; e100_enable_rs485()
1343 if (info->rs485.delay_rts_before_send >= 1000) e100_enable_rs485()
1344 info->rs485.delay_rts_before_send = 1000; e100_enable_rs485()
1347 info->rs485.rts_on_send, e100_enable_rs485()
1348 info->rs485.rts_after_sent, e100_enable_rs485()
1349 info->rs485.enabled e100_enable_rs485()
1360 int old_value = (info->rs485.flags) & SER_RS485_ENABLED; e100_write_rs485()
1362 /* rs485 is always implicitly enabled if we're using the ioctl() e100_write_rs485()
1367 info->rs485.flags |= SER_RS485_ENABLED; e100_write_rs485()
1371 info->rs485.flags &= ~(SER_RS485_ENABLED); e100_write_rs485()
1382 e100_rts(info, (info->rs485.flags & SER_RS485_RTS_AFTER_SEND)); rs485_toggle_rts_timer_function()
1560 if (info->rs485.flags & SER_RS485_ENABLED) { transmit_chars_dma()
2425 /* Send a byte, rs485 timing is critical so turn of ints */ handle_ser_tx_interrupt()
2432 if (info->rs485.flags & SER_RS485_ENABLED) { handle_ser_tx_interrupt()
3023 if (info->rs485.flags & SER_RS485_ENABLED) rs_write()
3033 e100_rts(info, (info->rs485.flags & SER_RS485_RTS_ON_SEND)); rs_write()
3038 if (info->rs485.delay_rts_before_send > 0) rs_write()
3039 msleep(info->rs485.delay_rts_before_send); rs_write()
3046 if (info->rs485.flags & SER_RS485_ENABLED) rs_write()
3067 e100_rts(info, (info->rs485.flags & SER_RS485_RTS_AFTER_SEND)); rs_write()
3524 &(((struct e100_serial *)tty->driver_data)->rs485); rs_ioctl()
3663 if (info->rs485.flags & SER_RS485_ENABLED) { rs_close()
3664 info->rs485.flags &= ~(SER_RS485_ENABLED); rs_close()
4218 info->rs485.flags &= ~(SER_RS485_RTS_ON_SEND); rs_init()
4219 info->rs485.flags |= SER_RS485_RTS_AFTER_SEND; rs_init()
4220 info->rs485.delay_rts_before_send = 0; rs_init()
4221 info->rs485.flags &= ~(SER_RS485_ENABLED); rs_init()
H A Dserial_core.c1169 struct serial_rs485 __user *rs485) uart_get_rs485_config()
1175 aux = port->rs485; uart_get_rs485_config()
1178 if (copy_to_user(rs485, &aux, sizeof(aux))) uart_get_rs485_config()
1187 struct serial_rs485 rs485; uart_set_rs485_config() local
1194 if (copy_from_user(&rs485, rs485_user, sizeof(*rs485_user))) uart_set_rs485_config()
1198 ret = port->rs485_config(port, &rs485); uart_set_rs485_config()
1203 if (copy_to_user(rs485_user, &port->rs485, sizeof(port->rs485))) uart_set_rs485_config()
1168 uart_get_rs485_config(struct uart_port *port, struct serial_rs485 __user *rs485) uart_get_rs485_config() argument
/linux-4.4.14/arch/x86/platform/ts5500/
H A Dts5500.c73 * @rs485: Flag for RS-485 option.
83 bool rs485; member in struct:ts5500_sbc
141 sbc->rs485 = tmp & TS5500_RS485; ts5500_detect_config()
194 TS5500_ATTR_BOOL(rs485); variable
/linux-4.4.14/include/linux/
H A Dserial_core.h136 struct serial_rs485 *rs485);
248 struct serial_rs485 rs485; member in struct:uart_port
/linux-4.4.14/drivers/staging/comedi/drivers/
H A Dgsc_hpdi.c4 * High Speed Parallel Digital Interface rs485 boards.
26 * Speed Parallel Digital Interface rs485 boards
/linux-4.4.14/drivers/pinctrl/spear/
H A Dpinctrl-spear320.c1831 .name = "rs485",

Completed in 640 milliseconds