Lines Matching refs:port_priv
331 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_set_port_register() local
334 reg + port_priv->phy_num * F81534_UART_OFFSET, data); in f81534_set_port_register()
340 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_get_port_register() local
343 reg + port_priv->phy_num * F81534_UART_OFFSET, data); in f81534_get_port_register()
475 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_prepare_write_buffer() local
476 int phy_num = port_priv->phy_num; in f81534_prepare_write_buffer()
504 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_submit_writer() local
520 if (!test_and_clear_bit(F81534_TX_EMPTY_BIT, &port_priv->tx_empty)) in f81534_submit_writer()
529 set_bit(F81534_TX_EMPTY_BIT, &port_priv->tx_empty); in f81534_submit_writer()
564 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()
1016 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_msr_changed() local
1024 spin_lock_irqsave(&port_priv->msr_lock, flags); in f81534_msr_changed()
1025 old_msr = port_priv->shadow_msr; in f81534_msr_changed()
1026 port_priv->shadow_msr = msr; in f81534_msr_changed()
1027 spin_unlock_irqrestore(&port_priv->msr_lock, flags); in f81534_msr_changed()
1048 __func__, port_priv->phy_num, old_msr, msr); in f81534_msr_changed()
1060 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_read_msr() local
1071 spin_lock_irqsave(&port_priv->msr_lock, flags); in f81534_read_msr()
1072 port_priv->shadow_msr = msr; in f81534_read_msr()
1073 spin_unlock_irqrestore(&port_priv->msr_lock, flags); in f81534_read_msr()
1082 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_open() local
1115 set_bit(F81534_TX_EMPTY_BIT, &port_priv->tx_empty); in f81534_open()
1149 struct f81534_port_private *port_priv; in f81534_get_serial_info() local
1151 port_priv = usb_get_serial_port_data(port); in f81534_get_serial_info()
1156 ss->baud_base = port_priv->baud_base; in f81534_get_serial_info()
1163 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_process_per_serial_block() local
1185 set_bit(F81534_TX_EMPTY_BIT, &port_priv->tx_empty); in f81534_process_per_serial_block()
1238 schedule_work(&port_priv->lsr_work); in f81534_process_per_serial_block()
1315 struct f81534_port_private *port_priv; in f81534_lsr_worker() local
1320 port_priv = container_of(work, struct f81534_port_private, lsr_work); in f81534_lsr_worker()
1321 port = port_priv->port; in f81534_lsr_worker()
1331 struct f81534_port_private *port_priv; in f81534_set_port_output_pin() local
1341 port_priv = usb_get_serial_port_data(port); in f81534_set_port_output_pin()
1343 idx = F81534_CONF_INIT_GPIO_OFFSET + port_priv->phy_num; in f81534_set_port_output_pin()
1350 idx = F81534_CONF_WORK_GPIO_OFFSET + port_priv->phy_num; in f81534_set_port_output_pin()
1356 pins = &f81534_port_out_pins[port_priv->phy_num]; in f81534_set_port_output_pin()
1373 struct f81534_port_private *port_priv; in f81534_port_probe() local
1378 port_priv = devm_kzalloc(&port->dev, sizeof(*port_priv), GFP_KERNEL); in f81534_port_probe()
1379 if (!port_priv) in f81534_port_probe()
1386 port_priv->shadow_clk = F81534_UART_EN | F81534_CLK_TX_DELAY_1BIT; in f81534_port_probe()
1387 spin_lock_init(&port_priv->msr_lock); in f81534_port_probe()
1388 mutex_init(&port_priv->mcr_mutex); in f81534_port_probe()
1389 mutex_init(&port_priv->lcr_mutex); in f81534_port_probe()
1390 INIT_WORK(&port_priv->lsr_work, f81534_lsr_worker); in f81534_port_probe()
1397 port_priv->phy_num = ret; in f81534_port_probe()
1398 port_priv->port = port; in f81534_port_probe()
1399 usb_set_serial_port_data(port, port_priv); in f81534_port_probe()
1401 port->port_number, port_priv->phy_num); in f81534_port_probe()
1414 value = serial_priv->conf_data[port_priv->phy_num]; in f81534_port_probe()
1417 port_priv->shadow_clk |= F81534_CLK_RS485_MODE | in f81534_port_probe()
1422 port_priv->shadow_clk |= F81534_CLK_RS485_MODE; in f81534_port_probe()
1437 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_port_remove() local
1439 flush_work(&port_priv->lsr_work); in f81534_port_remove()
1446 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_tiocmget() local
1457 mutex_lock(&port_priv->mcr_mutex); in f81534_tiocmget()
1458 mcr = port_priv->shadow_mcr; in f81534_tiocmget()
1459 mutex_unlock(&port_priv->mcr_mutex); in f81534_tiocmget()
1509 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_tx_empty() local
1511 return test_bit(F81534_TX_EMPTY_BIT, &port_priv->tx_empty); in f81534_tx_empty()