| /linux/drivers/tty/hvc/ |
| H A D | hvsi_lib.c | 50 pv->mctrl |= TIOCM_CD; in hvsi_cd_change() 52 pv->mctrl &= ~TIOCM_CD; in hvsi_cd_change() 292 unsigned short mctrl; in hvsilib_write_mctrl() local 294 mctrl = pv->mctrl; in hvsilib_write_mctrl() 296 mctrl |= TIOCM_DTR; in hvsilib_write_mctrl() 298 mctrl &= ~TIOCM_DTR; in hvsilib_write_mctrl() 299 if (mctrl == pv->mctrl) in hvsilib_write_mctrl() 301 pv->mctrl = mctrl; in hvsilib_write_mctrl()
|
| H A D | hvsi.c | 76 uint16_t mctrl; member 235 hp->mctrl &= TIOCM_CD; in hvsi_recv_control() 264 hp->mctrl = 0; in hvsi_recv_response() 267 hp->mctrl |= TIOCM_DTR; in hvsi_recv_response() 269 hp->mctrl |= TIOCM_CD; in hvsi_recv_response() 577 pr_debug("%s: mctrl 0x%x\n", __func__, hp->mctrl); in hvsi_get_mctrl() 583 static int hvsi_set_mctrl(struct hvsi_struct *hp, uint16_t mctrl) in hvsi_set_mctrl() argument 594 if (mctrl & TIOCM_DTR) in hvsi_set_mctrl() 737 ret = hvsi_set_mctrl(hp, hp->mctrl | TIOCM_DTR); in hvsi_open() 997 return hp->mctrl; in hvsi_tiocmget() [all …]
|
| /linux/drivers/tty/serial/ |
| H A D | men_z135_uart.c | 470 static void men_z135_set_mctrl(struct uart_port *port, unsigned int mctrl) in men_z135_set_mctrl() argument 476 if (mctrl & TIOCM_RTS) in men_z135_set_mctrl() 481 if (mctrl & TIOCM_DTR) in men_z135_set_mctrl() 486 if (mctrl & TIOCM_OUT1) in men_z135_set_mctrl() 491 if (mctrl & TIOCM_OUT2) in men_z135_set_mctrl() 496 if (mctrl & TIOCM_LOOP) in men_z135_set_mctrl() 513 unsigned int mctrl = 0; in men_z135_get_mctrl() local 519 mctrl |= TIOCM_CTS; in men_z135_get_mctrl() 521 mctrl |= TIOCM_DSR; in men_z135_get_mctrl() 523 mctrl |= TIOCM_RI; in men_z135_get_mctrl() [all …]
|
| H A D | bcm63xx_uart.c | 99 static void bcm_uart_set_mctrl(struct uart_port *port, unsigned int mctrl) in bcm_uart_set_mctrl() argument 106 if (!(mctrl & TIOCM_DTR)) in bcm_uart_set_mctrl() 108 if (!(mctrl & TIOCM_RTS)) in bcm_uart_set_mctrl() 113 if (mctrl & TIOCM_LOOP) in bcm_uart_set_mctrl() 125 unsigned int val, mctrl; in bcm_uart_get_mctrl() local 127 mctrl = 0; in bcm_uart_get_mctrl() 130 mctrl |= TIOCM_RI; in bcm_uart_get_mctrl() 132 mctrl |= TIOCM_CTS; in bcm_uart_get_mctrl() 134 mctrl |= TIOCM_CD; in bcm_uart_get_mctrl() 136 mctrl |= TIOCM_DSR; in bcm_uart_get_mctrl() [all …]
|
| H A D | pxa.c | 272 static void serial_pxa_set_mctrl(struct uart_port *port, unsigned int mctrl) in serial_pxa_set_mctrl() argument 277 if (mctrl & TIOCM_RTS) in serial_pxa_set_mctrl() 279 if (mctrl & TIOCM_DTR) in serial_pxa_set_mctrl() 281 if (mctrl & TIOCM_OUT1) in serial_pxa_set_mctrl() 283 if (mctrl & TIOCM_OUT2) in serial_pxa_set_mctrl() 285 if (mctrl & TIOCM_LOOP) in serial_pxa_set_mctrl() 350 up->port.mctrl |= TIOCM_OUT2; in serial_pxa_startup() 351 serial_pxa_set_mctrl(&up->port, up->port.mctrl); in serial_pxa_startup() 387 up->port.mctrl &= ~TIOCM_OUT2; in serial_pxa_shutdown() 388 serial_pxa_set_mctrl(&up->port, up->port.mctrl); in serial_pxa_shutdown() [all …]
|
| H A D | sccnxp.c | 569 static void sccnxp_set_mctrl(struct uart_port *port, unsigned int mctrl) in sccnxp_set_mctrl() argument 579 sccnxp_set_bit(port, DTR_OP, mctrl & TIOCM_DTR); in sccnxp_set_mctrl() 580 sccnxp_set_bit(port, RTS_OP, mctrl & TIOCM_RTS); in sccnxp_set_mctrl() 590 unsigned int mctrl = TIOCM_DSR | TIOCM_CTS | TIOCM_CAR; in sccnxp_get_mctrl() local 593 return mctrl; in sccnxp_get_mctrl() 602 mctrl &= ~TIOCM_DSR; in sccnxp_get_mctrl() 603 mctrl |= (ipr & bitmask) ? TIOCM_DSR : 0; in sccnxp_get_mctrl() 608 mctrl &= ~TIOCM_CTS; in sccnxp_get_mctrl() 609 mctrl |= (ipr & bitmask) ? TIOCM_CTS : 0; in sccnxp_get_mctrl() 614 mctrl &= ~TIOCM_CAR; in sccnxp_get_mctrl() [all …]
|
| H A D | pic32_uart.c | 146 static void pic32_uart_set_mctrl(struct uart_port *port, unsigned int mctrl) in pic32_uart_set_mctrl() argument 151 if (mctrl & TIOCM_LOOP) in pic32_uart_set_mctrl() 163 unsigned int mctrl = 0; in pic32_uart_get_mctrl() local 167 mctrl |= TIOCM_CTS; in pic32_uart_get_mctrl() 169 mctrl |= TIOCM_CTS; in pic32_uart_get_mctrl() 174 mctrl |= TIOCM_CD; in pic32_uart_get_mctrl() 175 mctrl |= TIOCM_DSR; in pic32_uart_get_mctrl() 177 return mctrl; in pic32_uart_get_mctrl()
|
| H A D | rda-uart.c | 154 unsigned int mctrl = 0; in rda_uart_get_mctrl() local 160 mctrl |= TIOCM_RTS; in rda_uart_get_mctrl() 162 mctrl |= TIOCM_CTS; in rda_uart_get_mctrl() 164 return mctrl; in rda_uart_get_mctrl() 167 static void rda_uart_set_mctrl(struct uart_port *port, unsigned int mctrl) in rda_uart_set_mctrl() argument 171 if (mctrl & TIOCM_RTS) { in rda_uart_set_mctrl() 182 if (mctrl & TIOCM_LOOP) in rda_uart_set_mctrl()
|
| H A D | sunplus-uart.c | 99 static void sunplus_set_mctrl(struct uart_port *port, unsigned int mctrl) in sunplus_set_mctrl() argument 103 if (mctrl & TIOCM_DTR) in sunplus_set_mctrl() 108 if (mctrl & TIOCM_RTS) in sunplus_set_mctrl() 113 if (mctrl & TIOCM_CAR) in sunplus_set_mctrl() 118 if (mctrl & TIOCM_RI) in sunplus_set_mctrl() 123 if (mctrl & TIOCM_LOOP) in sunplus_set_mctrl()
|
| H A D | mxs-auart.c | 696 static void mxs_auart_set_mctrl(struct uart_port *u, unsigned mctrl) in mxs_auart_set_mctrl() argument 703 if (mctrl & TIOCM_RTS) { in mxs_auart_set_mctrl() 712 mctrl_gpio_set(s->gpios, mctrl); in mxs_auart_set_mctrl() 716 static u32 mxs_auart_modem_status(struct mxs_auart_port *s, u32 mctrl) in mxs_auart_modem_status() argument 720 mctrl_diff = mctrl ^ s->mctrl_prev; in mxs_auart_modem_status() 721 s->mctrl_prev = mctrl; in mxs_auart_modem_status() 729 uart_handle_dcd_change(&s->port, mctrl & TIOCM_CD); in mxs_auart_modem_status() 731 uart_handle_cts_change(&s->port, mctrl & TIOCM_CTS); in mxs_auart_modem_status() 735 return mctrl; in mxs_auart_modem_status() 742 u32 mctrl = 0; in mxs_auart_get_mctrl() local [all …]
|
| H A D | owl-uart.c | 94 static void owl_uart_set_mctrl(struct uart_port *port, unsigned int mctrl) in owl_uart_set_mctrl() argument 100 if (mctrl & TIOCM_LOOP) in owl_uart_set_mctrl() 110 unsigned int mctrl = TIOCM_CAR | TIOCM_DSR; in owl_uart_get_mctrl() local 116 mctrl |= TIOCM_RTS; in owl_uart_get_mctrl() 118 mctrl |= TIOCM_CTS; in owl_uart_get_mctrl() 119 return mctrl; in owl_uart_get_mctrl()
|
| H A D | timbuart.c | 109 port->mctrl & TIOCM_RTS, in timbuart_tx_chars() 204 static void timbuart_set_mctrl(struct uart_port *port, unsigned int mctrl) in timbuart_set_mctrl() argument 206 dev_dbg(port->dev, "%s - %x\n", __func__, mctrl); in timbuart_set_mctrl() 208 if (mctrl & TIOCM_RTS) in timbuart_set_mctrl()
|
| H A D | sc16is7xx.c | 699 unsigned int mctrl = 0; in sc16is7xx_get_hwmctrl() local 701 mctrl |= (msr & SC16IS7XX_MSR_CTS_BIT) ? TIOCM_CTS : 0; in sc16is7xx_get_hwmctrl() 702 mctrl |= (msr & SC16IS7XX_MSR_DSR_BIT) ? TIOCM_DSR : 0; in sc16is7xx_get_hwmctrl() 703 mctrl |= (msr & SC16IS7XX_MSR_CD_BIT) ? TIOCM_CAR : 0; in sc16is7xx_get_hwmctrl() 704 mctrl |= (msr & SC16IS7XX_MSR_RI_BIT) ? TIOCM_RNG : 0; in sc16is7xx_get_hwmctrl() 705 return mctrl; in sc16is7xx_get_hwmctrl() 869 if (one->port.mctrl & TIOCM_RTS) in sc16is7xx_reg_proc() 872 if (one->port.mctrl & TIOCM_DTR) in sc16is7xx_reg_proc() 875 if (one->port.mctrl & TIOCM_LOOP) in sc16is7xx_reg_proc() 963 static void sc16is7xx_set_mctrl(struct uart_port *port, unsigned int mctrl) in sc16is7xx_set_mctrl() argument
|
| H A D | xilinx_uartps.c | 1146 unsigned int mctrl = 0; in cdns_uart_get_mctrl() local 1154 mctrl |= TIOCM_CTS; in cdns_uart_get_mctrl() 1156 mctrl |= TIOCM_DSR; in cdns_uart_get_mctrl() 1158 mctrl |= TIOCM_RNG; in cdns_uart_get_mctrl() 1160 mctrl |= TIOCM_CAR; in cdns_uart_get_mctrl() 1162 return mctrl; in cdns_uart_get_mctrl() 1165 static void cdns_uart_set_mctrl(struct uart_port *port, unsigned int mctrl) in cdns_uart_set_mctrl() argument 1180 if (mctrl & TIOCM_RTS) in cdns_uart_set_mctrl() 1183 gpiod_set_value(cdns_uart_data->gpiod_rts, !(mctrl & TIOCM_RTS)); in cdns_uart_set_mctrl() 1184 if (mctrl & TIOCM_DTR) in cdns_uart_set_mctrl() [all …]
|
| H A D | omap-serial.c | 610 static void serial_omap_set_mctrl(struct uart_port *port, unsigned int mctrl) in serial_omap_set_mctrl() argument 616 if (mctrl & TIOCM_RTS) in serial_omap_set_mctrl() 618 if (mctrl & TIOCM_DTR) in serial_omap_set_mctrl() 620 if (mctrl & TIOCM_OUT1) in serial_omap_set_mctrl() 622 if (mctrl & TIOCM_OUT2) in serial_omap_set_mctrl() 624 if (mctrl & TIOCM_LOOP) in serial_omap_set_mctrl() 636 if ((mctrl & TIOCM_RTS) && (port->status & UPSTAT_AUTORTS)) in serial_omap_set_mctrl() 708 up->port.mctrl |= TIOCM_OUT2; in serial_omap_startup() 709 serial_omap_set_mctrl(&up->port, up->port.mctrl); in serial_omap_startup() 746 up->port.mctrl &= ~TIOCM_OUT2; in serial_omap_shutdown() [all …]
|
| H A D | serial_core.c | 183 old = port->mctrl; in uart_update_mctrl() 184 port->mctrl = (old & ~clear) | set; in uart_update_mctrl() 185 if (old != port->mctrl && !(port->rs485.flags & SER_RS485_ENABLED)) in uart_update_mctrl() 186 port->ops->set_mctrl(port, port->mctrl); in uart_update_mctrl() 1092 return uport->mctrl | uport->ops->get_mctrl(uport); in uart_tiocmget() 1480 port->ops->set_mctrl(port, port->mctrl); in uart_set_rs485_config() 1871 int mctrl; in uart_carrier_raised() local 1883 mctrl = uport->ops->get_mctrl(uport); in uart_carrier_raised() 1886 return mctrl & TIOCM_CAR; in uart_carrier_raised() 2019 if (uport->mctrl & (bit)) \ in uart_line_info() [all …]
|
| H A D | cpm_uart.c | 88 static void cpm_uart_set_mctrl(struct uart_port *port, unsigned int mctrl) in cpm_uart_set_mctrl() argument 94 gpiod_set_value(pinfo->gpios[GPIO_RTS], !(mctrl & TIOCM_RTS)); in cpm_uart_set_mctrl() 97 gpiod_set_value(pinfo->gpios[GPIO_DTR], !(mctrl & TIOCM_DTR)); in cpm_uart_set_mctrl() 104 unsigned int mctrl = TIOCM_CTS | TIOCM_DSR | TIOCM_CAR; in cpm_uart_get_mctrl() local 108 mctrl &= ~TIOCM_CTS; in cpm_uart_get_mctrl() 113 mctrl &= ~TIOCM_DSR; in cpm_uart_get_mctrl() 118 mctrl &= ~TIOCM_CAR; in cpm_uart_get_mctrl() 123 mctrl |= TIOCM_RNG; in cpm_uart_get_mctrl() 126 return mctrl; in cpm_uart_get_mctrl()
|
| H A D | esp32_uart.c | 174 static void esp32_uart_set_mctrl(struct uart_port *port, unsigned int mctrl) in esp32_uart_set_mctrl() argument 182 if (mctrl & TIOCM_RTS) in esp32_uart_set_mctrl() 184 if (mctrl & TIOCM_DTR) in esp32_uart_set_mctrl() 186 if (mctrl & TIOCM_LOOP) in esp32_uart_set_mctrl()
|
| H A D | serial_txx9.c | 390 static void serial_txx9_set_mctrl(struct uart_port *up, unsigned int mctrl) in serial_txx9_set_mctrl() argument 393 if (mctrl & TIOCM_RTS) in serial_txx9_set_mctrl() 522 serial_txx9_set_mctrl(up, up->mctrl); in serial_txx9_startup() 546 serial_txx9_set_mctrl(up, up->mctrl); in serial_txx9_shutdown() 679 serial_txx9_set_mctrl(up, up->mctrl); in serial_txx9_set_termios()
|
| /linux/arch/arm/mach-versatile/ |
| H A D | integrator_ap.c | 110 void __iomem *base, unsigned int mctrl) in integrator_uart_set_mctrl() argument 126 if (mctrl & TIOCM_RTS) in integrator_uart_set_mctrl() 131 if (mctrl & TIOCM_DTR) in integrator_uart_set_mctrl()
|
| /linux/drivers/tty/serial/8250/ |
| H A D | 8250.h | 293 int mctrl; in serial8250_in_MCR() local 295 mctrl = serial_in(up, UART_MCR); in serial8250_in_MCR() 301 mctrl |= serial8250_TIOCM_to_MCR(mctrl_gpio); in serial8250_in_MCR() 304 return mctrl; in serial8250_in_MCR()
|
| H A D | 8250_pci1xxxx.c | 270 static void pci1xxxx_set_mctrl(struct uart_port *port, unsigned int mctrl) in pci1xxxx_set_mctrl() argument 285 serial8250_do_set_mctrl(port, mctrl); in pci1xxxx_set_mctrl() 287 if (RTS_TOGGLE_STATUS_MASK(mctrl, modem_ctl_reg)) { in pci1xxxx_set_mctrl() 568 port->mctrl &= ~TIOCM_OUT2; in pci1xxxx_port_suspend() 569 port->ops->set_mctrl(port, port->mctrl); in pci1xxxx_port_suspend() 594 port->mctrl |= TIOCM_OUT2; in pci1xxxx_port_resume() 595 port->ops->set_mctrl(port, port->mctrl); in pci1xxxx_port_resume()
|
| /linux/arch/arm/boot/dts/cirrus/ |
| H A D | ep7209.dtsi | 195 mctrl: mctrl { label 196 compatible = "cirrus,ep7209-mctrl-gpio";
|
| /linux/arch/arm/mach-sa1100/ |
| H A D | collie.c | 156 static void collie_uart_set_mctrl(struct uart_port *port, u_int mctrl) in collie_uart_set_mctrl() argument 158 if (mctrl & TIOCM_RTS) in collie_uart_set_mctrl() 163 if (mctrl & TIOCM_DTR) in collie_uart_set_mctrl()
|
| /linux/drivers/net/ethernet/sfc/falcon/ |
| H A D | txc43128_phy.c | 279 int mctrl; in txc_apply_defaults() local 309 mctrl = ef4_mdio_read(efx, MDIO_MMD_PHYXS, TXC_MRGS_CTL); in txc_apply_defaults() 312 mctrl &= ~((1 << TXC_MCTL_TXLED_LBN) | (1 << TXC_MCTL_RXLED_LBN)); in txc_apply_defaults() 313 ef4_mdio_write(efx, MDIO_MMD_PHYXS, TXC_MRGS_CTL, mctrl); in txc_apply_defaults()
|