Lines Matching full:one

366 	struct sc16is7xx_one *one = to_sc16is7xx_one(port, port);  in sc16is7xx_port_read()  local
369 regmap_read(one->regmap, reg, &val); in sc16is7xx_port_read()
376 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_port_write() local
378 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, s->buf, rxlen); in sc16is7xx_fifo_read()
392 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_fifo_write() local
401 regmap_noinc_write(one->regmap, SC16IS7XX_THR_REG, s->buf, to_send); in sc16is7xx_fifo_write()
407 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_port_update() local
409 regmap_update_bits(one->regmap, reg, mask, val); in sc16is7xx_port_update()
499 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_set_baud() local
522 mutex_lock(&one->efr_lock); in sc16is7xx_set_baud()
531 regcache_cache_bypass(one->regmap, true); in sc16is7xx_set_baud()
536 regcache_cache_bypass(one->regmap, false); in sc16is7xx_set_baud()
541 mutex_unlock(&one->efr_lock); in sc16is7xx_set_baud()
548 mutex_lock(&one->efr_lock); in sc16is7xx_set_baud()
555 regcache_cache_bypass(one->regmap, true); in sc16is7xx_set_baud()
558 regcache_cache_bypass(one->regmap, false); in sc16is7xx_set_baud()
563 mutex_unlock(&one->efr_lock); in sc16is7xx_set_baud()
713 static void sc16is7xx_update_mlines(struct sc16is7xx_one *one) in sc16is7xx_update_mlines() argument
715 struct uart_port *port = &one->port; in sc16is7xx_update_mlines()
719 lockdep_assert_held_once(&one->efr_lock); in sc16is7xx_update_mlines()
722 changed = status ^ one->old_mctrl; in sc16is7xx_update_mlines()
727 one->old_mctrl = status; in sc16is7xx_update_mlines()
748 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_port_irq() local
750 mutex_lock(&one->efr_lock); in sc16is7xx_port_irq()
772 * When this happens, read one byte from the FIFO to in sc16is7xx_port_irq()
784 sc16is7xx_update_mlines(one); in sc16is7xx_port_irq()
797 mutex_unlock(&one->efr_lock); in sc16is7xx_port_irq()
823 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_tx_proc() local
829 mutex_lock(&one->efr_lock); in sc16is7xx_tx_proc()
831 mutex_unlock(&one->efr_lock); in sc16is7xx_tx_proc()
856 struct sc16is7xx_one *one = to_sc16is7xx_one(ws, reg_work); in sc16is7xx_reg_proc() local
860 uart_port_lock_irqsave(&one->port, &irqflags); in sc16is7xx_reg_proc()
861 config = one->config; in sc16is7xx_reg_proc()
862 memset(&one->config, 0, sizeof(one->config)); in sc16is7xx_reg_proc()
863 uart_port_unlock_irqrestore(&one->port, irqflags); in sc16is7xx_reg_proc()
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()
877 sc16is7xx_port_update(&one->port, SC16IS7XX_MCR_REG, in sc16is7xx_reg_proc()
885 sc16is7xx_port_update(&one->port, SC16IS7XX_IER_REG, in sc16is7xx_reg_proc()
889 sc16is7xx_reconf_rs485(&one->port); in sc16is7xx_reg_proc()
895 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_ier_clear() local
899 one->config.flags |= SC16IS7XX_RECONF_IER; in sc16is7xx_ier_clear()
900 one->config.ier_mask |= bit; in sc16is7xx_ier_clear()
901 one->config.ier_val &= ~bit; in sc16is7xx_ier_clear()
902 kthread_queue_work(&s->kworker, &one->reg_work); in sc16is7xx_ier_clear()
908 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_ier_set() local
912 one->config.flags |= SC16IS7XX_RECONF_IER; in sc16is7xx_ier_set()
913 one->config.ier_mask |= bit; in sc16is7xx_ier_set()
914 one->config.ier_val |= bit; in sc16is7xx_ier_set()
915 kthread_queue_work(&s->kworker, &one->reg_work); in sc16is7xx_ier_set()
930 struct sc16is7xx_one *one = to_sc16is7xx_one(ws, ms_work.work); in sc16is7xx_ms_proc() local
931 struct sc16is7xx_port *s = dev_get_drvdata(one->port.dev); in sc16is7xx_ms_proc()
933 if (one->port.state) { in sc16is7xx_ms_proc()
934 mutex_lock(&one->efr_lock); in sc16is7xx_ms_proc()
935 sc16is7xx_update_mlines(one); in sc16is7xx_ms_proc()
936 mutex_unlock(&one->efr_lock); in sc16is7xx_ms_proc()
938 kthread_queue_delayed_work(&s->kworker, &one->ms_work, HZ); in sc16is7xx_ms_proc()
944 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_enable_ms() local
949 kthread_queue_delayed_work(&s->kworker, &one->ms_work, 0); in sc16is7xx_enable_ms()
955 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_start_tx() local
957 kthread_queue_work(&s->kworker, &one->tx_work); in sc16is7xx_start_tx()
994 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_get_mctrl() local
997 return one->old_mctrl; in sc16is7xx_get_mctrl()
1003 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_set_mctrl() local
1005 one->config.flags |= SC16IS7XX_RECONF_MD; in sc16is7xx_set_mctrl()
1006 kthread_queue_work(&s->kworker, &one->reg_work); in sc16is7xx_set_mctrl()
1020 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_set_termios() local
1025 kthread_cancel_delayed_work_sync(&one->ms_work); in sc16is7xx_set_termios()
1078 mutex_lock(&one->efr_lock); in sc16is7xx_set_termios()
1084 regcache_cache_bypass(one->regmap, true); in sc16is7xx_set_termios()
1103 regcache_cache_bypass(one->regmap, false); in sc16is7xx_set_termios()
1108 mutex_unlock(&one->efr_lock); in sc16is7xx_set_termios()
1133 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_config_rs485() local
1145 one->config.flags |= SC16IS7XX_RECONF_RS485; in sc16is7xx_config_rs485()
1146 kthread_queue_work(&s->kworker, &one->reg_work); in sc16is7xx_config_rs485()
1153 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_startup() local
1170 regcache_cache_bypass(one->regmap, true); in sc16is7xx_startup()
1188 regcache_cache_bypass(one->regmap, false); in sc16is7xx_startup()
1197 one->irda_mode ? in sc16is7xx_startup()
1222 struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); in sc16is7xx_shutdown() local
1224 kthread_cancel_delayed_work_sync(&one->ms_work); in sc16is7xx_shutdown()