Home
last modified time | relevance | path

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

1234

/linux-6.6.21/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.c126 struct serial_rs485 *rs485);
428 struct serial_rs485 *rs485) in generic_rs485_config() argument
430 bool is_rs485 = !!(rs485->flags & SER_RS485_ENABLED); in generic_rs485_config()
460 struct serial_rs485 *rs485) in iot2040_rs485_config() argument
462 bool is_rs485 = !!(rs485->flags & SER_RS485_ENABLED); in iot2040_rs485_config()
468 if (rs485->flags & SER_RS485_RX_DURING_TX) in iot2040_rs485_config()
473 if (rs485->flags & SER_RS485_TERMINATE_BUS) in iot2040_rs485_config()
489 return generic_rs485_config(port, termios, rs485); in iot2040_rs485_config()
/linux-6.6.21/Documentation/devicetree/bindings/serial/
Drs485.yaml4 $id: http://devicetree.org/schemas/serial/rs485.yaml#
17 rs485-rts-delay:
32 rs485-rts-active-high:
36 rs485-rts-active-low:
40 rs485-rx-active-high:
45 linux,rs485-enabled-at-boot-time:
46 description: enables the rs485 feature at boot time. It can be disabled
50 rs485-rx-during-tx:
54 rs485-term-gpios:
58 rs485-rx-during-tx-gpios:
[all …]
Drs485.txt1 See rs485.yaml
D8250_omap.yaml14 - $ref: /schemas/serial/rs485.yaml#
73 rs485-rts-active-high: true
/linux-6.6.21/arch/arm/boot/dts/microchip/
Daks-cdu.dts32 linux,rs485-enabled-at-boot-time;
33 rs485-rts-delay = <0 0>;
38 linux,rs485-enabled-at-boot-time;
39 rs485-rts-delay = <0 0>;
44 linux,rs485-enabled-at-boot-time;
45 rs485-rts-delay = <0 0>;
/linux-6.6.21/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 …]
/linux-6.6.21/arch/arm/boot/dts/nxp/mxs/
Dimx28-duckbill-2-485.dts15 rs485-red {
16 label = "duckbill:red:rs485";
20 rs485-green {
21 label = "duckbill:green:rs485";
/linux-6.6.21/drivers/tty/serial/
Dserial_core.c185 if (old != port->mctrl && !(port->rs485.flags & SER_RS485_ENABLED)) in uart_update_mctrl()
1304 static int uart_check_rs485_flags(struct uart_port *port, struct serial_rs485 *rs485) in uart_check_rs485_flags() argument
1306 u32 flags = rs485->flags; in uart_check_rs485_flags()
1319 if (!(rs485->flags & SER_RS485_ADDRB) && in uart_check_rs485_flags()
1320 (rs485->flags & (SER_RS485_ADDR_RECV|SER_RS485_ADDR_DEST))) in uart_check_rs485_flags()
1324 if (!(rs485->flags & SER_RS485_ADDR_RECV) && rs485->addr_recv) in uart_check_rs485_flags()
1326 if (!(rs485->flags & SER_RS485_ADDR_DEST) && rs485->addr_dest) in uart_check_rs485_flags()
1333 struct serial_rs485 *rs485) in uart_sanitize_serial_rs485_delays() argument
1336 if (rs485->delay_rts_before_send) { in uart_sanitize_serial_rs485_delays()
1341 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.c435 if (port->rs485.flags & SER_RS485_ENABLED) { in imx_uart_stop_tx()
439 if (port->rs485.delay_rts_after_send > 0) { in imx_uart_stop_tx()
441 port->rs485.delay_rts_after_send); in imx_uart_stop_tx()
455 if (port->rs485.flags & SER_RS485_RTS_AFTER_SEND) in imx_uart_stop_tx()
492 if (port->rs485.flags & SER_RS485_ENABLED && in imx_uart_stop_rx()
493 port->rs485.flags & SER_RS485_RTS_ON_SEND && in imx_uart_stop_rx()
597 else if (sport->port.rs485.flags & SER_RS485_ENABLED) { in imx_uart_dma_tx_callback()
682 if (port->rs485.flags & SER_RS485_ENABLED) { in imx_uart_start_tx()
685 if (port->rs485.flags & SER_RS485_RTS_ON_SEND) in imx_uart_start_tx()
691 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()
/linux-6.6.21/arch/arm/boot/dts/ti/omap/
Dam335x-nano.dts171 rs485-rts-active-high;
172 rs485-rx-during-tx;
173 rs485-rts-delay = <1 1>;
174 linux,rs485-enabled-at-boot-time;
182 rs485-rts-active-high;
183 rs485-rts-delay = <1 1>;
184 linux,rs485-enabled-at-boot-time;
191 rs485-rts-active-high;
192 rs485-rx-during-tx;
193 rs485-rts-delay = <1 1>;
[all …]
/linux-6.6.21/arch/arm/boot/dts/nxp/imx/
Dimx6qdl-dhcom-drc02.dtsi30 rs485-rx-en-hog {
33 line-name = "rs485-rx-en";
92 linux,rs485-enabled-at-boot-time;
122 * P: uart5 rs485-tx-en
123 * Q: uart5 rs485-rx-en
Dimx6ull-dhcom-drc02.dts59 rs485-rx-en-hog {
62 line-name = "rs485-rx-en";
97 linux,rs485-enabled-at-boot-time;
/linux-6.6.21/arch/arm64/boot/dts/freescale/
Dimx8mm-verdin-dev.dtsi133 linux,rs485-enabled-at-boot-time;
134 rs485-rts-active-low;
135 rs485-rx-during-tx;
Dimx8mp-verdin-dev.dtsi173 linux,rs485-enabled-at-boot-time;
174 rs485-rts-active-low;
175 rs485-rx-during-tx;
DMakefile156 imx8mm-venice-gw72xx-0x-rs485-dtbs := imx8mm-venice-gw72xx-0x.dtb imx8mm-venice-gw72xx-0x-rs485.dtbo
161 imx8mm-venice-gw73xx-0x-rs485-dtbs := imx8mm-venice-gw73xx-0x.dtb imx8mm-venice-gw73xx-0x-rs485.dtbo
168 dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw72xx-0x-rs485.dtb
173 dtb-$(CONFIG_ARCH_MXC) += imx8mm-venice-gw73xx-0x-rs485.dtb
/linux-6.6.21/arch/x86/platform/ts5500/
Dts5500.c77 bool rs485; member
135 sbc->rs485 = tmp & TS5500_RS485; in ts5500_detect_config()
188 TS5500_ATTR_BOOL(rs485);
/linux-6.6.21/arch/arm/boot/dts/st/
Dstm32mp15xx-dhcom-drc02.dtsi36 rs485-rx-en-hog {
40 line-name = "rs485-rx-en";
145 linux,rs485-enabled-at-boot-time;

1234