Lines Matching refs:port_priv
329 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_set_port_register() local
332 reg + port_priv->phy_num * F81534_UART_OFFSET, data); in f81534_set_port_register()
338 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_get_port_register() local
341 reg + port_priv->phy_num * F81534_UART_OFFSET, data); in f81534_get_port_register()
473 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_prepare_write_buffer() local
474 int phy_num = port_priv->phy_num; in f81534_prepare_write_buffer()
502 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_submit_writer() local
518 if (!test_and_clear_bit(F81534_TX_EMPTY_BIT, &port_priv->tx_empty)) in f81534_submit_writer()
527 set_bit(F81534_TX_EMPTY_BIT, &port_priv->tx_empty); in f81534_submit_writer()
559 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_set_port_config() local
584 port_priv->baud_base = baudrate_table[idx]; in f81534_set_port_config()
585 port_priv->shadow_clk &= ~F81534_CLK_MASK; in f81534_set_port_config()
586 port_priv->shadow_clk |= clock_table[idx]; in f81534_set_port_config()
589 port_priv->shadow_clk); in f81534_set_port_config()
618 divisor = f81534_calc_baud_divisor(baudrate, port_priv->baud_base); in f81534_set_port_config()
620 mutex_lock(&port_priv->lcr_mutex); in f81534_set_port_config()
644 value = lcr | (port_priv->shadow_lcr & UART_LCR_SBC); in f81534_set_port_config()
652 port_priv->shadow_lcr = value; in f81534_set_port_config()
654 mutex_unlock(&port_priv->lcr_mutex); in f81534_set_port_config()
662 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_break_ctl() local
665 mutex_lock(&port_priv->lcr_mutex); in f81534_break_ctl()
668 port_priv->shadow_lcr |= UART_LCR_SBC; in f81534_break_ctl()
670 port_priv->shadow_lcr &= ~UART_LCR_SBC; in f81534_break_ctl()
673 port_priv->shadow_lcr); in f81534_break_ctl()
677 mutex_unlock(&port_priv->lcr_mutex); in f81534_break_ctl()
683 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_update_mctrl() local
690 mutex_lock(&port_priv->mcr_mutex); in f81534_update_mctrl()
696 tmp = UART_MCR_OUT2 | port_priv->shadow_mcr; in f81534_update_mctrl()
713 mutex_unlock(&port_priv->mcr_mutex); in f81534_update_mctrl()
717 port_priv->shadow_mcr = tmp; in f81534_update_mctrl()
718 mutex_unlock(&port_priv->mcr_mutex); in f81534_update_mctrl()
1002 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_msr_changed() local
1010 spin_lock_irqsave(&port_priv->msr_lock, flags); in f81534_msr_changed()
1011 old_msr = port_priv->shadow_msr; in f81534_msr_changed()
1012 port_priv->shadow_msr = msr; in f81534_msr_changed()
1013 spin_unlock_irqrestore(&port_priv->msr_lock, flags); in f81534_msr_changed()
1034 __func__, port_priv->phy_num, old_msr, msr); in f81534_msr_changed()
1046 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_read_msr() local
1057 spin_lock_irqsave(&port_priv->msr_lock, flags); in f81534_read_msr()
1058 port_priv->shadow_msr = msr; in f81534_read_msr()
1059 spin_unlock_irqrestore(&port_priv->msr_lock, flags); in f81534_read_msr()
1068 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_open() local
1101 set_bit(F81534_TX_EMPTY_BIT, &port_priv->tx_empty); in f81534_open()
1134 struct f81534_port_private *port_priv; in f81534_get_serial_info() local
1136 port_priv = usb_get_serial_port_data(port); in f81534_get_serial_info()
1138 ss->baud_base = port_priv->baud_base; in f81534_get_serial_info()
1144 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_process_per_serial_block() local
1166 set_bit(F81534_TX_EMPTY_BIT, &port_priv->tx_empty); in f81534_process_per_serial_block()
1219 schedule_work(&port_priv->lsr_work); in f81534_process_per_serial_block()
1296 struct f81534_port_private *port_priv; in f81534_lsr_worker() local
1301 port_priv = container_of(work, struct f81534_port_private, lsr_work); in f81534_lsr_worker()
1302 port = port_priv->port; in f81534_lsr_worker()
1312 struct f81534_port_private *port_priv; in f81534_set_port_output_pin() local
1322 port_priv = usb_get_serial_port_data(port); in f81534_set_port_output_pin()
1324 idx = F81534_CONF_INIT_GPIO_OFFSET + port_priv->phy_num; in f81534_set_port_output_pin()
1331 idx = F81534_CONF_WORK_GPIO_OFFSET + port_priv->phy_num; in f81534_set_port_output_pin()
1337 pins = &f81534_port_out_pins[port_priv->phy_num]; in f81534_set_port_output_pin()
1354 struct f81534_port_private *port_priv; in f81534_port_probe() local
1359 port_priv = devm_kzalloc(&port->dev, sizeof(*port_priv), GFP_KERNEL); in f81534_port_probe()
1360 if (!port_priv) in f81534_port_probe()
1367 port_priv->shadow_clk = F81534_UART_EN | F81534_CLK_TX_DELAY_1BIT; in f81534_port_probe()
1368 spin_lock_init(&port_priv->msr_lock); in f81534_port_probe()
1369 mutex_init(&port_priv->mcr_mutex); in f81534_port_probe()
1370 mutex_init(&port_priv->lcr_mutex); in f81534_port_probe()
1371 INIT_WORK(&port_priv->lsr_work, f81534_lsr_worker); in f81534_port_probe()
1378 port_priv->phy_num = ret; in f81534_port_probe()
1379 port_priv->port = port; in f81534_port_probe()
1380 usb_set_serial_port_data(port, port_priv); in f81534_port_probe()
1382 port->port_number, port_priv->phy_num); in f81534_port_probe()
1395 value = serial_priv->conf_data[port_priv->phy_num]; in f81534_port_probe()
1398 port_priv->shadow_clk |= F81534_CLK_RS485_MODE | in f81534_port_probe()
1403 port_priv->shadow_clk |= F81534_CLK_RS485_MODE; in f81534_port_probe()
1418 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_port_remove() local
1420 flush_work(&port_priv->lsr_work); in f81534_port_remove()
1426 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_tiocmget() local
1437 mutex_lock(&port_priv->mcr_mutex); in f81534_tiocmget()
1438 mcr = port_priv->shadow_mcr; in f81534_tiocmget()
1439 mutex_unlock(&port_priv->mcr_mutex); in f81534_tiocmget()
1489 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_tx_empty() local
1491 return test_bit(F81534_TX_EMPTY_BIT, &port_priv->tx_empty); in f81534_tx_empty()