Lines Matching full:one
367 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_port_read() local
370 regmap_read(one->regmap, reg, &val); in sc16is7xx_port_read()
377 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_port_write() local
379 regmap_write(one->regmap, reg, val); in sc16is7xx_port_write()
384 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_fifo_read() local
386 regmap_noinc_read(one->regmap, SC16IS7XX_RHR_REG, rxbuf, rxlen); in sc16is7xx_fifo_read()
391 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_fifo_write() local
400 regmap_noinc_write(one->regmap, SC16IS7XX_THR_REG, txbuf, to_send); in sc16is7xx_fifo_write()
406 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_port_update() local
408 regmap_update_bits(one->regmap, reg, mask, val); in sc16is7xx_port_update()
434 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_efr_lock() local
436 mutex_lock(&one->efr_lock); in sc16is7xx_efr_lock()
439 one->old_lcr = sc16is7xx_port_read(port, SC16IS7XX_LCR_REG); in sc16is7xx_efr_lock()
445 regcache_cache_bypass(one->regmap, true); in sc16is7xx_efr_lock()
450 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_efr_unlock() local
453 regcache_cache_bypass(one->regmap, false); in sc16is7xx_efr_unlock()
456 sc16is7xx_port_write(port, SC16IS7XX_LCR_REG, one->old_lcr); in sc16is7xx_efr_unlock()
458 mutex_unlock(&one->efr_lock); in sc16is7xx_efr_unlock()
464 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_ier_clear() local
468 one->config.flags |= SC16IS7XX_RECONF_IER; in sc16is7xx_ier_clear()
469 one->config.ier_mask |= bit; in sc16is7xx_ier_clear()
470 one->config.ier_val &= ~bit; in sc16is7xx_ier_clear()
471 kthread_queue_work(&s->kworker, &one->reg_work); in sc16is7xx_ier_clear()
477 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_ier_set() local
481 one->config.flags |= SC16IS7XX_RECONF_IER; in sc16is7xx_ier_set()
482 one->config.ier_mask |= bit; in sc16is7xx_ier_set()
483 one->config.ier_val |= bit; in sc16is7xx_ier_set()
484 kthread_queue_work(&s->kworker, &one->reg_work); in sc16is7xx_ier_set()
578 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_set_baud() local
600 mutex_lock(&one->efr_lock); in sc16is7xx_set_baud()
608 regcache_cache_bypass(one->regmap, true); in sc16is7xx_set_baud()
611 regcache_cache_bypass(one->regmap, false); in sc16is7xx_set_baud()
616 mutex_unlock(&one->efr_lock); in sc16is7xx_set_baud()
624 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_handle_rx() local
629 if (unlikely(rxlen >= sizeof(one->buf))) { in sc16is7xx_handle_rx()
635 rxlen = sizeof(one->buf); in sc16is7xx_handle_rx()
648 one->buf[0] = sc16is7xx_port_read(port, SC16IS7XX_RHR_REG); in sc16is7xx_handle_rx()
651 sc16is7xx_fifo_read(port, one->buf, rxlen); in sc16is7xx_handle_rx()
684 ch = one->buf[i]; in sc16is7xx_handle_rx()
757 static void sc16is7xx_update_mlines(struct sc16is7xx_one *one) in sc16is7xx_update_mlines() argument
759 struct uart_port *port = &one->port; in sc16is7xx_update_mlines()
763 lockdep_assert_held_once(&one->efr_lock); in sc16is7xx_update_mlines()
766 changed = status ^ one->old_mctrl; in sc16is7xx_update_mlines()
771 one->old_mctrl = status; in sc16is7xx_update_mlines()
792 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_port_irq() local
794 mutex_lock(&one->efr_lock); in sc16is7xx_port_irq()
816 * When this happens, read one byte from the FIFO to in sc16is7xx_port_irq()
828 sc16is7xx_update_mlines(one); in sc16is7xx_port_irq()
841 mutex_unlock(&one->efr_lock); in sc16is7xx_port_irq()
867 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_tx_proc() local
873 mutex_lock(&one->efr_lock); in sc16is7xx_tx_proc()
875 mutex_unlock(&one->efr_lock); in sc16is7xx_tx_proc()
900 struct sc16is7xx_one *one = to_sc16is7xx_one(ws, reg_work); in sc16is7xx_reg_proc() local
904 uart_port_lock_irqsave(&one->port, &irqflags); in sc16is7xx_reg_proc()
905 config = one->config; in sc16is7xx_reg_proc()
906 memset(&one->config, 0, sizeof(one->config)); in sc16is7xx_reg_proc()
907 uart_port_unlock_irqrestore(&one->port, irqflags); in sc16is7xx_reg_proc()
913 if (one->port.mctrl & TIOCM_RTS) in sc16is7xx_reg_proc()
916 if (one->port.mctrl & TIOCM_DTR) in sc16is7xx_reg_proc()
919 if (one->port.mctrl & TIOCM_LOOP) in sc16is7xx_reg_proc()
921 sc16is7xx_port_update(&one->port, SC16IS7XX_MCR_REG, in sc16is7xx_reg_proc()
929 sc16is7xx_port_update(&one->port, SC16IS7XX_IER_REG, in sc16is7xx_reg_proc()
933 sc16is7xx_reconf_rs485(&one->port); in sc16is7xx_reg_proc()
938 struct sc16is7xx_one *one = to_sc16is7xx_one(ws, ms_work.work); in sc16is7xx_ms_proc() local
939 struct sc16is7xx_port *s = dev_get_drvdata(one->port.dev); in sc16is7xx_ms_proc()
941 if (one->port.state) { in sc16is7xx_ms_proc()
942 mutex_lock(&one->efr_lock); in sc16is7xx_ms_proc()
943 sc16is7xx_update_mlines(one); in sc16is7xx_ms_proc()
944 mutex_unlock(&one->efr_lock); in sc16is7xx_ms_proc()
946 kthread_queue_delayed_work(&s->kworker, &one->ms_work, HZ); in sc16is7xx_ms_proc()
952 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_enable_ms() local
957 kthread_queue_delayed_work(&s->kworker, &one->ms_work, 0); in sc16is7xx_enable_ms()
963 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_start_tx() local
965 kthread_queue_work(&s->kworker, &one->tx_work); in sc16is7xx_start_tx()
1002 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_get_mctrl() local
1005 return one->old_mctrl; in sc16is7xx_get_mctrl()
1011 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_set_mctrl() local
1013 one->config.flags |= SC16IS7XX_RECONF_MD; in sc16is7xx_set_mctrl()
1014 kthread_queue_work(&s->kworker, &one->reg_work); in sc16is7xx_set_mctrl()
1028 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_set_termios() local
1033 kthread_cancel_delayed_work_sync(&one->ms_work); in sc16is7xx_set_termios()
1131 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_config_rs485() local
1143 one->config.flags |= SC16IS7XX_RECONF_RS485; in sc16is7xx_config_rs485()
1144 kthread_queue_work(&s->kworker, &one->reg_work); in sc16is7xx_config_rs485()
1151 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_startup() local
1168 regcache_cache_bypass(one->regmap, true); in sc16is7xx_startup()
1186 regcache_cache_bypass(one->regmap, false); in sc16is7xx_startup()
1195 one->irda_mode ? in sc16is7xx_startup()
1220 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_shutdown() local
1222 kthread_cancel_delayed_work_sync(&one->ms_work); in sc16is7xx_shutdown()