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()
562 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_set_port_config() local
582 port_priv->baud_base = baudrate_table[idx]; in f81534_set_port_config()
583 port_priv->shadow_clk &= ~F81534_CLK_MASK; in f81534_set_port_config()
584 port_priv->shadow_clk |= clock_table[idx]; in f81534_set_port_config()
587 port_priv->shadow_clk); in f81534_set_port_config()
616 divisor = f81534_calc_baud_divisor(baudrate, port_priv->baud_base); in f81534_set_port_config()
618 mutex_lock(&port_priv->lcr_mutex); in f81534_set_port_config()
642 value = lcr | (port_priv->shadow_lcr & UART_LCR_SBC); in f81534_set_port_config()
650 port_priv->shadow_lcr = value; in f81534_set_port_config()
652 mutex_unlock(&port_priv->lcr_mutex); in f81534_set_port_config()
660 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_break_ctl() local
663 mutex_lock(&port_priv->lcr_mutex); in f81534_break_ctl()
666 port_priv->shadow_lcr |= UART_LCR_SBC; in f81534_break_ctl()
668 port_priv->shadow_lcr &= ~UART_LCR_SBC; in f81534_break_ctl()
671 port_priv->shadow_lcr); in f81534_break_ctl()
675 mutex_unlock(&port_priv->lcr_mutex); in f81534_break_ctl()
681 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_update_mctrl() local
688 mutex_lock(&port_priv->mcr_mutex); in f81534_update_mctrl()
694 tmp = UART_MCR_OUT2 | port_priv->shadow_mcr; in f81534_update_mctrl()
711 mutex_unlock(&port_priv->mcr_mutex); in f81534_update_mctrl()
715 port_priv->shadow_mcr = tmp; in f81534_update_mctrl()
716 mutex_unlock(&port_priv->mcr_mutex); in f81534_update_mctrl()
1000 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_msr_changed() local
1008 spin_lock_irqsave(&port_priv->msr_lock, flags); in f81534_msr_changed()
1009 old_msr = port_priv->shadow_msr; in f81534_msr_changed()
1010 port_priv->shadow_msr = msr; in f81534_msr_changed()
1011 spin_unlock_irqrestore(&port_priv->msr_lock, flags); in f81534_msr_changed()
1032 __func__, port_priv->phy_num, old_msr, msr); in f81534_msr_changed()
1044 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_read_msr() local
1055 spin_lock_irqsave(&port_priv->msr_lock, flags); in f81534_read_msr()
1056 port_priv->shadow_msr = msr; in f81534_read_msr()
1057 spin_unlock_irqrestore(&port_priv->msr_lock, flags); in f81534_read_msr()
1066 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_open() local
1099 set_bit(F81534_TX_EMPTY_BIT, &port_priv->tx_empty); in f81534_open()
1132 struct f81534_port_private *port_priv; in f81534_get_serial_info() local
1134 port_priv = usb_get_serial_port_data(port); in f81534_get_serial_info()
1136 ss->baud_base = port_priv->baud_base; in f81534_get_serial_info()
1142 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_process_per_serial_block() local
1164 set_bit(F81534_TX_EMPTY_BIT, &port_priv->tx_empty); in f81534_process_per_serial_block()
1217 schedule_work(&port_priv->lsr_work); in f81534_process_per_serial_block()
1294 struct f81534_port_private *port_priv; in f81534_lsr_worker() local
1299 port_priv = container_of(work, struct f81534_port_private, lsr_work); in f81534_lsr_worker()
1300 port = port_priv->port; in f81534_lsr_worker()
1310 struct f81534_port_private *port_priv; in f81534_set_port_output_pin() local
1320 port_priv = usb_get_serial_port_data(port); in f81534_set_port_output_pin()
1322 idx = F81534_CONF_INIT_GPIO_OFFSET + port_priv->phy_num; in f81534_set_port_output_pin()
1329 idx = F81534_CONF_WORK_GPIO_OFFSET + port_priv->phy_num; in f81534_set_port_output_pin()
1335 pins = &f81534_port_out_pins[port_priv->phy_num]; in f81534_set_port_output_pin()
1352 struct f81534_port_private *port_priv; in f81534_port_probe() local
1357 port_priv = devm_kzalloc(&port->dev, sizeof(*port_priv), GFP_KERNEL); in f81534_port_probe()
1358 if (!port_priv) in f81534_port_probe()
1365 port_priv->shadow_clk = F81534_UART_EN | F81534_CLK_TX_DELAY_1BIT; in f81534_port_probe()
1366 spin_lock_init(&port_priv->msr_lock); in f81534_port_probe()
1367 mutex_init(&port_priv->mcr_mutex); in f81534_port_probe()
1368 mutex_init(&port_priv->lcr_mutex); in f81534_port_probe()
1369 INIT_WORK(&port_priv->lsr_work, f81534_lsr_worker); in f81534_port_probe()
1376 port_priv->phy_num = ret; in f81534_port_probe()
1377 port_priv->port = port; in f81534_port_probe()
1378 usb_set_serial_port_data(port, port_priv); in f81534_port_probe()
1380 port->port_number, port_priv->phy_num); in f81534_port_probe()
1393 value = serial_priv->conf_data[port_priv->phy_num]; in f81534_port_probe()
1396 port_priv->shadow_clk |= F81534_CLK_RS485_MODE | in f81534_port_probe()
1401 port_priv->shadow_clk |= F81534_CLK_RS485_MODE; in f81534_port_probe()
1416 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_port_remove() local
1418 flush_work(&port_priv->lsr_work); in f81534_port_remove()
1424 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_tiocmget() local
1435 mutex_lock(&port_priv->mcr_mutex); in f81534_tiocmget()
1436 mcr = port_priv->shadow_mcr; in f81534_tiocmget()
1437 mutex_unlock(&port_priv->mcr_mutex); in f81534_tiocmget()
1487 struct f81534_port_private *port_priv = usb_get_serial_port_data(port); in f81534_tx_empty() local
1489 return test_bit(F81534_TX_EMPTY_BIT, &port_priv->tx_empty); in f81534_tx_empty()