Lines Matching +full:auto +full:- +full:baud
1 // SPDX-License-Identifier: GPL-2.0+
3 * SC16IS7xx tty serial driver - Copyright (C) 2014 GridPoint
46 * - only on 75x/76x
49 * - only on 75x/76x
52 * - only on 75x/76x
55 * - only on 75x/76x
83 /* IER register bits - write only if (EFR[4] == 1) */
96 /* FCR register bits - write only if (EFR[4] == 1) */
106 #define SC16IS7XX_IIR_RTOI_SRC 0x0c /* RX time-out interrupt */
108 * - only on 75x/76x
111 * - only on 75x/76x
123 * 00 -> 5 bit words
124 * 01 -> 6 bit words
125 * 10 -> 7 bit words
126 * 11 -> 8 bit words
131 * 0 -> 1 stop bit
132 * 1 -> 1-1.5 stop bits if
138 #define SC16IS7XX_LCR_FORCEPARITY_BIT (1 << 5) /* 9-bit multidrop parity */
152 * - only on 75x/76x
158 * - write enabled
162 * - write enabled
166 * - write enabled
185 * - only on 75x/76x
189 * - only on 75x/76x
193 * - only on 75x/76x
197 * - only on 75x/76x
200 * - only on 75x/76x
203 * - only on 75x/76x
212 * no built-in hardware check to make sure this condition is met. Also, the TCR
213 * must be programmed with this condition before auto RTS or software flow
227 * trigger level setting defined in FCR. If TLR has non-zero trigger level value
243 #define SC16IS7XX_EFCR_9BIT_MODE_BIT (1 << 0) /* Enable 9-bit or Multidrop
247 #define SC16IS7XX_EFCR_AUTO_RS485_BIT (1 << 4) /* Auto RS485 RTS direction */
251 * - Only 750/760
253 * - Only 760
257 #define SC16IS7XX_EFR_AUTORTS_BIT (1 << 6) /* Auto RTS flow ctrl enable */
258 #define SC16IS7XX_EFR_AUTOCTS_BIT (1 << 7) /* Auto CTS flow ctrl enable */
268 * 00 -> no transmitter flow
270 * 01 -> transmitter generates
272 * 10 -> transmitter generates
274 * 11 -> transmitter generates
282 * 00 -> no received flow
284 * 01 -> receiver compares
286 * 10 -> receiver compares
288 * 11 -> receiver compares
350 return one->line; in sc16is7xx_line()
355 struct sc16is7xx_port *s = dev_get_drvdata(port->dev); in sc16is7xx_port_read()
359 regmap_read(s->regmap, (reg << SC16IS7XX_REG_SHIFT) | line, &val); in sc16is7xx_port_read()
366 struct sc16is7xx_port *s = dev_get_drvdata(port->dev); in sc16is7xx_port_write()
369 regmap_write(s->regmap, (reg << SC16IS7XX_REG_SHIFT) | line, val); in sc16is7xx_port_write()
374 struct sc16is7xx_port *s = dev_get_drvdata(port->dev); in sc16is7xx_fifo_read()
378 regcache_cache_bypass(s->regmap, true); in sc16is7xx_fifo_read()
379 regmap_raw_read(s->regmap, addr, s->buf, rxlen); in sc16is7xx_fifo_read()
380 regcache_cache_bypass(s->regmap, false); in sc16is7xx_fifo_read()
385 struct sc16is7xx_port *s = dev_get_drvdata(port->dev); in sc16is7xx_fifo_write()
390 * Don't send zero-length data, at least on SPI it confuses the chip in sc16is7xx_fifo_write()
396 regcache_cache_bypass(s->regmap, true); in sc16is7xx_fifo_write()
397 regmap_raw_write(s->regmap, addr, s->buf, to_send); in sc16is7xx_fifo_write()
398 regcache_cache_bypass(s->regmap, false); in sc16is7xx_fifo_write()
404 struct sc16is7xx_port *s = dev_get_drvdata(port->dev); in sc16is7xx_port_update()
407 regmap_update_bits(s->regmap, (reg << SC16IS7XX_REG_SHIFT) | line, in sc16is7xx_port_update()
491 static int sc16is7xx_set_baud(struct uart_port *port, int baud) in sc16is7xx_set_baud() argument
493 struct sc16is7xx_port *s = dev_get_drvdata(port->dev); in sc16is7xx_set_baud()
496 unsigned long clk = port->uartclk, div = clk / 16 / baud; in sc16is7xx_set_baud()
516 mutex_lock(&s->efr_lock); in sc16is7xx_set_baud()
525 regcache_cache_bypass(s->regmap, true); in sc16is7xx_set_baud()
528 regcache_cache_bypass(s->regmap, false); in sc16is7xx_set_baud()
533 mutex_unlock(&s->efr_lock); in sc16is7xx_set_baud()
544 regcache_cache_bypass(s->regmap, true); in sc16is7xx_set_baud()
547 regcache_cache_bypass(s->regmap, false); in sc16is7xx_set_baud()
558 struct sc16is7xx_port *s = dev_get_drvdata(port->dev); in sc16is7xx_handle_rx()
562 if (unlikely(rxlen >= sizeof(s->buf))) { in sc16is7xx_handle_rx()
563 dev_warn_ratelimited(port->dev, in sc16is7xx_handle_rx()
565 port->line, rxlen); in sc16is7xx_handle_rx()
566 port->icount.buf_overrun++; in sc16is7xx_handle_rx()
568 rxlen = sizeof(s->buf); in sc16is7xx_handle_rx()
581 s->buf[0] = sc16is7xx_port_read(port, SC16IS7XX_RHR_REG); in sc16is7xx_handle_rx()
590 port->icount.rx++; in sc16is7xx_handle_rx()
595 port->icount.brk++; in sc16is7xx_handle_rx()
599 port->icount.parity++; in sc16is7xx_handle_rx()
601 port->icount.frame++; in sc16is7xx_handle_rx()
603 port->icount.overrun++; in sc16is7xx_handle_rx()
605 lsr &= port->read_status_mask; in sc16is7xx_handle_rx()
617 ch = s->buf[i]; in sc16is7xx_handle_rx()
621 if (lsr & port->ignore_status_mask) in sc16is7xx_handle_rx()
627 rxlen -= bytes_read; in sc16is7xx_handle_rx()
630 tty_flip_buffer_push(&port->state->port); in sc16is7xx_handle_rx()
635 struct sc16is7xx_port *s = dev_get_drvdata(port->dev); in sc16is7xx_handle_tx()
636 struct circ_buf *xmit = &port->state->xmit; in sc16is7xx_handle_tx()
639 if (unlikely(port->x_char)) { in sc16is7xx_handle_tx()
640 sc16is7xx_port_write(port, SC16IS7XX_THR_REG, port->x_char); in sc16is7xx_handle_tx()
641 port->icount.tx++; in sc16is7xx_handle_tx()
642 port->x_char = 0; in sc16is7xx_handle_tx()
655 dev_err_ratelimited(port->dev, in sc16is7xx_handle_tx()
663 port->icount.tx += to_send; in sc16is7xx_handle_tx()
667 s->buf[i] = xmit->buf[xmit->tail]; in sc16is7xx_handle_tx()
668 xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); in sc16is7xx_handle_tx()
680 struct uart_port *port = &s->p[portno].port; in sc16is7xx_port_irq()
704 dev_err_ratelimited(port->dev, in sc16is7xx_port_irq()
706 port->line, iir); in sc16is7xx_port_irq()
717 mutex_lock(&s->efr_lock); in sc16is7xx_irq()
723 for (i = 0; i < s->devtype->nr_uart; ++i) in sc16is7xx_irq()
729 mutex_unlock(&s->efr_lock); in sc16is7xx_irq()
736 struct uart_port *port = &(to_sc16is7xx_one(ws, tx_work)->port); in sc16is7xx_tx_proc()
738 if ((port->rs485.flags & SER_RS485_ENABLED) && in sc16is7xx_tx_proc()
739 (port->rs485.delay_rts_before_send > 0)) in sc16is7xx_tx_proc()
740 msleep(port->rs485.delay_rts_before_send); in sc16is7xx_tx_proc()
750 struct serial_rs485 *rs485 = &port->rs485; in sc16is7xx_reconf_rs485()
753 spin_lock_irqsave(&port->lock, irqflags); in sc16is7xx_reconf_rs485()
754 if (rs485->flags & SER_RS485_ENABLED) { in sc16is7xx_reconf_rs485()
757 if (rs485->flags & SER_RS485_RTS_AFTER_SEND) in sc16is7xx_reconf_rs485()
760 spin_unlock_irqrestore(&port->lock, irqflags); in sc16is7xx_reconf_rs485()
771 spin_lock_irqsave(&one->port.lock, irqflags); in sc16is7xx_reg_proc()
772 config = one->config; in sc16is7xx_reg_proc()
773 memset(&one->config, 0, sizeof(one->config)); in sc16is7xx_reg_proc()
774 spin_unlock_irqrestore(&one->port.lock, irqflags); in sc16is7xx_reg_proc()
777 sc16is7xx_port_update(&one->port, SC16IS7XX_MCR_REG, in sc16is7xx_reg_proc()
779 (one->port.mctrl & TIOCM_LOOP) ? in sc16is7xx_reg_proc()
781 sc16is7xx_port_update(&one->port, SC16IS7XX_MCR_REG, in sc16is7xx_reg_proc()
783 (one->port.mctrl & TIOCM_RTS) ? in sc16is7xx_reg_proc()
785 sc16is7xx_port_update(&one->port, SC16IS7XX_MCR_REG, in sc16is7xx_reg_proc()
787 (one->port.mctrl & TIOCM_DTR) ? in sc16is7xx_reg_proc()
791 sc16is7xx_port_update(&one->port, SC16IS7XX_IER_REG, in sc16is7xx_reg_proc()
795 sc16is7xx_reconf_rs485(&one->port); in sc16is7xx_reg_proc()
800 struct sc16is7xx_port *s = dev_get_drvdata(port->dev); in sc16is7xx_ier_clear()
803 one->config.flags |= SC16IS7XX_RECONF_IER; in sc16is7xx_ier_clear()
804 one->config.ier_clear |= bit; in sc16is7xx_ier_clear()
805 kthread_queue_work(&s->kworker, &one->reg_work); in sc16is7xx_ier_clear()
820 struct sc16is7xx_port *s = dev_get_drvdata(port->dev); in sc16is7xx_start_tx()
823 kthread_queue_work(&s->kworker, &one->tx_work); in sc16is7xx_start_tx()
845 struct sc16is7xx_port *s = dev_get_drvdata(port->dev); in sc16is7xx_set_mctrl()
848 one->config.flags |= SC16IS7XX_RECONF_MD; in sc16is7xx_set_mctrl()
849 kthread_queue_work(&s->kworker, &one->reg_work); in sc16is7xx_set_mctrl()
863 struct sc16is7xx_port *s = dev_get_drvdata(port->dev); in sc16is7xx_set_termios()
865 int baud; in sc16is7xx_set_termios() local
868 termios->c_cflag &= ~CMSPAR; in sc16is7xx_set_termios()
871 switch (termios->c_cflag & CSIZE) { in sc16is7xx_set_termios()
886 termios->c_cflag &= ~CSIZE; in sc16is7xx_set_termios()
887 termios->c_cflag |= CS8; in sc16is7xx_set_termios()
892 if (termios->c_cflag & PARENB) { in sc16is7xx_set_termios()
894 if (!(termios->c_cflag & PARODD)) in sc16is7xx_set_termios()
899 if (termios->c_cflag & CSTOPB) in sc16is7xx_set_termios()
903 port->read_status_mask = SC16IS7XX_LSR_OE_BIT; in sc16is7xx_set_termios()
904 if (termios->c_iflag & INPCK) in sc16is7xx_set_termios()
905 port->read_status_mask |= SC16IS7XX_LSR_PE_BIT | in sc16is7xx_set_termios()
907 if (termios->c_iflag & (BRKINT | PARMRK)) in sc16is7xx_set_termios()
908 port->read_status_mask |= SC16IS7XX_LSR_BI_BIT; in sc16is7xx_set_termios()
911 port->ignore_status_mask = 0; in sc16is7xx_set_termios()
912 if (termios->c_iflag & IGNBRK) in sc16is7xx_set_termios()
913 port->ignore_status_mask |= SC16IS7XX_LSR_BI_BIT; in sc16is7xx_set_termios()
914 if (!(termios->c_cflag & CREAD)) in sc16is7xx_set_termios()
915 port->ignore_status_mask |= SC16IS7XX_LSR_BRK_ERROR_MASK; in sc16is7xx_set_termios()
918 mutex_lock(&s->efr_lock); in sc16is7xx_set_termios()
924 regcache_cache_bypass(s->regmap, true); in sc16is7xx_set_termios()
925 sc16is7xx_port_write(port, SC16IS7XX_XON1_REG, termios->c_cc[VSTART]); in sc16is7xx_set_termios()
926 sc16is7xx_port_write(port, SC16IS7XX_XOFF1_REG, termios->c_cc[VSTOP]); in sc16is7xx_set_termios()
927 if (termios->c_cflag & CRTSCTS) in sc16is7xx_set_termios()
930 if (termios->c_iflag & IXON) in sc16is7xx_set_termios()
932 if (termios->c_iflag & IXOFF) in sc16is7xx_set_termios()
936 regcache_cache_bypass(s->regmap, false); in sc16is7xx_set_termios()
941 mutex_unlock(&s->efr_lock); in sc16is7xx_set_termios()
943 /* Get baud rate generator configuration */ in sc16is7xx_set_termios()
944 baud = uart_get_baud_rate(port, termios, old, in sc16is7xx_set_termios()
945 port->uartclk / 16 / 4 / 0xffff, in sc16is7xx_set_termios()
946 port->uartclk / 16); in sc16is7xx_set_termios()
949 baud = sc16is7xx_set_baud(port, baud); in sc16is7xx_set_termios()
951 /* Update timeout according to new baud rate */ in sc16is7xx_set_termios()
952 uart_update_timeout(port, termios->c_cflag, baud); in sc16is7xx_set_termios()
958 struct sc16is7xx_port *s = dev_get_drvdata(port->dev); in sc16is7xx_config_rs485()
961 if (rs485->flags & SER_RS485_ENABLED) { in sc16is7xx_config_rs485()
964 rts_during_rx = rs485->flags & SER_RS485_RTS_AFTER_SEND; in sc16is7xx_config_rs485()
965 rts_during_tx = rs485->flags & SER_RS485_RTS_ON_SEND; in sc16is7xx_config_rs485()
968 dev_err(port->dev, in sc16is7xx_config_rs485()
969 …"unsupported RTS signalling on_send:%d after_send:%d - exactly one of RS485 RTS flags should be se… in sc16is7xx_config_rs485()
977 if (rs485->delay_rts_after_send) in sc16is7xx_config_rs485()
978 return -EINVAL; in sc16is7xx_config_rs485()
981 port->rs485 = *rs485; in sc16is7xx_config_rs485()
982 one->config.flags |= SC16IS7XX_RECONF_RS485; in sc16is7xx_config_rs485()
983 kthread_queue_work(&s->kworker, &one->reg_work); in sc16is7xx_config_rs485()
991 struct sc16is7xx_port *s = dev_get_drvdata(port->dev); in sc16is7xx_startup()
1007 regcache_cache_bypass(s->regmap, true); in sc16is7xx_startup()
1024 regcache_cache_bypass(s->regmap, false); in sc16is7xx_startup()
1033 one->irda_mode ? in sc16is7xx_startup()
1051 struct sc16is7xx_port *s = dev_get_drvdata(port->dev); in sc16is7xx_shutdown()
1064 kthread_flush_worker(&s->kworker); in sc16is7xx_shutdown()
1069 struct sc16is7xx_port *s = dev_get_drvdata(port->dev); in sc16is7xx_type()
1071 return (port->type == PORT_SC16IS7XX) ? s->devtype->name : NULL; in sc16is7xx_type()
1083 port->type = PORT_SC16IS7XX; in sc16is7xx_config_port()
1089 if ((s->type != PORT_UNKNOWN) && (s->type != PORT_SC16IS7XX)) in sc16is7xx_verify_port()
1090 return -EINVAL; in sc16is7xx_verify_port()
1091 if (s->irq != port->irq) in sc16is7xx_verify_port()
1092 return -EINVAL; in sc16is7xx_verify_port()
1132 struct uart_port *port = &s->p[0].port; in sc16is7xx_gpio_get()
1142 struct uart_port *port = &s->p[0].port; in sc16is7xx_gpio_set()
1152 struct uart_port *port = &s->p[0].port; in sc16is7xx_gpio_direction_input()
1163 struct uart_port *port = &s->p[0].port; in sc16is7xx_gpio_direction_output()
1202 s = devm_kzalloc(dev, struct_size(s, p, devtype->nr_uart), GFP_KERNEL); in sc16is7xx_probe()
1205 return -ENOMEM; in sc16is7xx_probe()
1209 device_property_read_u32(dev, "clock-frequency", &uartclk); in sc16is7xx_probe()
1211 s->clk = devm_clk_get(dev, NULL); in sc16is7xx_probe()
1212 if (IS_ERR(s->clk)) { in sc16is7xx_probe()
1220 return PTR_ERR(s->clk); in sc16is7xx_probe()
1222 ret = clk_prepare_enable(s->clk); in sc16is7xx_probe()
1226 freq = clk_get_rate(s->clk); in sc16is7xx_probe()
1229 s->regmap = regmap; in sc16is7xx_probe()
1230 s->devtype = devtype; in sc16is7xx_probe()
1232 mutex_init(&s->efr_lock); in sc16is7xx_probe()
1234 kthread_init_worker(&s->kworker); in sc16is7xx_probe()
1235 s->kworker_task = kthread_run(kthread_worker_fn, &s->kworker, in sc16is7xx_probe()
1237 if (IS_ERR(s->kworker_task)) { in sc16is7xx_probe()
1238 ret = PTR_ERR(s->kworker_task); in sc16is7xx_probe()
1241 sched_set_fifo(s->kworker_task); in sc16is7xx_probe()
1244 if (devtype->nr_gpio) { in sc16is7xx_probe()
1246 s->gpio.owner = THIS_MODULE; in sc16is7xx_probe()
1247 s->gpio.parent = dev; in sc16is7xx_probe()
1248 s->gpio.label = dev_name(dev); in sc16is7xx_probe()
1249 s->gpio.direction_input = sc16is7xx_gpio_direction_input; in sc16is7xx_probe()
1250 s->gpio.get = sc16is7xx_gpio_get; in sc16is7xx_probe()
1251 s->gpio.direction_output = sc16is7xx_gpio_direction_output; in sc16is7xx_probe()
1252 s->gpio.set = sc16is7xx_gpio_set; in sc16is7xx_probe()
1253 s->gpio.base = -1; in sc16is7xx_probe()
1254 s->gpio.ngpio = devtype->nr_gpio; in sc16is7xx_probe()
1255 s->gpio.can_sleep = 1; in sc16is7xx_probe()
1256 ret = gpiochip_add_data(&s->gpio, s); in sc16is7xx_probe()
1263 regmap_write(s->regmap, SC16IS7XX_IOCONTROL_REG << SC16IS7XX_REG_SHIFT, in sc16is7xx_probe()
1266 for (i = 0; i < devtype->nr_uart; ++i) { in sc16is7xx_probe()
1267 s->p[i].line = i; in sc16is7xx_probe()
1269 s->p[i].port.dev = dev; in sc16is7xx_probe()
1270 s->p[i].port.irq = irq; in sc16is7xx_probe()
1271 s->p[i].port.type = PORT_SC16IS7XX; in sc16is7xx_probe()
1272 s->p[i].port.fifosize = SC16IS7XX_FIFO_SIZE; in sc16is7xx_probe()
1273 s->p[i].port.flags = UPF_FIXED_TYPE | UPF_LOW_LATENCY; in sc16is7xx_probe()
1274 s->p[i].port.iobase = i; in sc16is7xx_probe()
1275 s->p[i].port.iotype = UPIO_PORT; in sc16is7xx_probe()
1276 s->p[i].port.uartclk = freq; in sc16is7xx_probe()
1277 s->p[i].port.rs485_config = sc16is7xx_config_rs485; in sc16is7xx_probe()
1278 s->p[i].port.ops = &sc16is7xx_ops; in sc16is7xx_probe()
1279 s->p[i].port.line = sc16is7xx_alloc_line(); in sc16is7xx_probe()
1280 if (s->p[i].port.line >= SC16IS7XX_MAX_DEVS) { in sc16is7xx_probe()
1281 ret = -ENOMEM; in sc16is7xx_probe()
1286 sc16is7xx_port_write(&s->p[i].port, SC16IS7XX_IER_REG, 0); in sc16is7xx_probe()
1288 sc16is7xx_port_write(&s->p[i].port, SC16IS7XX_EFCR_REG, in sc16is7xx_probe()
1292 kthread_init_work(&s->p[i].tx_work, sc16is7xx_tx_proc); in sc16is7xx_probe()
1293 kthread_init_work(&s->p[i].reg_work, sc16is7xx_reg_proc); in sc16is7xx_probe()
1295 uart_add_one_port(&sc16is7xx_uart, &s->p[i].port); in sc16is7xx_probe()
1298 sc16is7xx_port_write(&s->p[i].port, SC16IS7XX_LCR_REG, in sc16is7xx_probe()
1301 regcache_cache_bypass(s->regmap, true); in sc16is7xx_probe()
1304 sc16is7xx_port_write(&s->p[i].port, SC16IS7XX_EFR_REG, in sc16is7xx_probe()
1307 regcache_cache_bypass(s->regmap, false); in sc16is7xx_probe()
1310 sc16is7xx_port_write(&s->p[i].port, SC16IS7XX_LCR_REG, 0x00); in sc16is7xx_probe()
1313 sc16is7xx_power(&s->p[i].port, 0); in sc16is7xx_probe()
1316 if (dev->of_node) { in sc16is7xx_probe()
1321 of_property_for_each_u32(dev->of_node, "irda-mode-ports", in sc16is7xx_probe()
1323 if (u < devtype->nr_uart) in sc16is7xx_probe()
1324 s->p[u].irda_mode = true; in sc16is7xx_probe()
1331 * back to a non-shared falling-edge trigger. in sc16is7xx_probe()
1347 for (i--; i >= 0; i--) { in sc16is7xx_probe()
1348 uart_remove_one_port(&sc16is7xx_uart, &s->p[i].port); in sc16is7xx_probe()
1349 clear_bit(s->p[i].port.line, &sc16is7xx_lines); in sc16is7xx_probe()
1353 if (devtype->nr_gpio) in sc16is7xx_probe()
1354 gpiochip_remove(&s->gpio); in sc16is7xx_probe()
1358 kthread_stop(s->kworker_task); in sc16is7xx_probe()
1361 if (!IS_ERR(s->clk)) in sc16is7xx_probe()
1362 clk_disable_unprepare(s->clk); in sc16is7xx_probe()
1373 if (s->devtype->nr_gpio) in sc16is7xx_remove()
1374 gpiochip_remove(&s->gpio); in sc16is7xx_remove()
1377 for (i = 0; i < s->devtype->nr_uart; i++) { in sc16is7xx_remove()
1378 uart_remove_one_port(&sc16is7xx_uart, &s->p[i].port); in sc16is7xx_remove()
1379 clear_bit(s->p[i].port.line, &sc16is7xx_lines); in sc16is7xx_remove()
1380 sc16is7xx_power(&s->p[i].port, 0); in sc16is7xx_remove()
1383 kthread_flush_worker(&s->kworker); in sc16is7xx_remove()
1384 kthread_stop(s->kworker_task); in sc16is7xx_remove()
1386 if (!IS_ERR(s->clk)) in sc16is7xx_remove()
1387 clk_disable_unprepare(s->clk); in sc16is7xx_remove()
1420 spi->bits_per_word = 8; in sc16is7xx_spi_probe()
1422 spi->mode = spi->mode ? : SPI_MODE_0; in sc16is7xx_spi_probe()
1423 spi->max_speed_hz = spi->max_speed_hz ? : 15000000; in sc16is7xx_spi_probe()
1428 if (spi->dev.of_node) { in sc16is7xx_spi_probe()
1429 devtype = device_get_match_data(&spi->dev); in sc16is7xx_spi_probe()
1431 return -ENODEV; in sc16is7xx_spi_probe()
1435 devtype = (struct sc16is7xx_devtype *)id_entry->driver_data; in sc16is7xx_spi_probe()
1439 (devtype->nr_uart - 1); in sc16is7xx_spi_probe()
1442 return sc16is7xx_probe(&spi->dev, devtype, regmap, spi->irq); in sc16is7xx_spi_probe()
1447 return sc16is7xx_remove(&spi->dev); in sc16is7xx_spi_remove()
1483 if (i2c->dev.of_node) { in sc16is7xx_i2c_probe()
1484 devtype = device_get_match_data(&i2c->dev); in sc16is7xx_i2c_probe()
1486 return -ENODEV; in sc16is7xx_i2c_probe()
1488 devtype = (struct sc16is7xx_devtype *)id->driver_data; in sc16is7xx_i2c_probe()
1492 (devtype->nr_uart - 1); in sc16is7xx_i2c_probe()
1495 return sc16is7xx_probe(&i2c->dev, devtype, regmap, i2c->irq); in sc16is7xx_i2c_probe()
1500 return sc16is7xx_remove(&client->dev); in sc16is7xx_i2c_remove()
1540 pr_err("failed to init sc16is7xx i2c --> %d\n", ret); in sc16is7xx_init()
1548 pr_err("failed to init sc16is7xx spi --> %d\n", ret); in sc16is7xx_init()