Lines Matching refs:max3100s
136 static struct max3100_port *max3100s[MAX_MAX3100]; /* the chips */ variable
756 if (!max3100s[i]) in max3100_probe()
764 max3100s[i] = kzalloc(sizeof(struct max3100_port), GFP_KERNEL); in max3100_probe()
765 if (!max3100s[i]) { in max3100_probe()
771 max3100s[i]->spi = spi; in max3100_probe()
772 max3100s[i]->irq = spi->irq; in max3100_probe()
773 spin_lock_init(&max3100s[i]->conf_lock); in max3100_probe()
774 spi_set_drvdata(spi, max3100s[i]); in max3100_probe()
776 max3100s[i]->crystal = pdata->crystal; in max3100_probe()
777 max3100s[i]->loopback = pdata->loopback; in max3100_probe()
778 max3100s[i]->poll_time = msecs_to_jiffies(pdata->poll_time); in max3100_probe()
779 if (pdata->poll_time > 0 && max3100s[i]->poll_time == 0) in max3100_probe()
780 max3100s[i]->poll_time = 1; in max3100_probe()
781 max3100s[i]->max3100_hw_suspend = pdata->max3100_hw_suspend; in max3100_probe()
782 max3100s[i]->minor = i; in max3100_probe()
783 timer_setup(&max3100s[i]->timer, max3100_timeout, 0); in max3100_probe()
786 max3100s[i]->port.irq = max3100s[i]->irq; in max3100_probe()
787 max3100s[i]->port.uartclk = max3100s[i]->crystal ? 3686400 : 1843200; in max3100_probe()
788 max3100s[i]->port.fifosize = 16; in max3100_probe()
789 max3100s[i]->port.ops = &max3100_ops; in max3100_probe()
790 max3100s[i]->port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF; in max3100_probe()
791 max3100s[i]->port.line = i; in max3100_probe()
792 max3100s[i]->port.type = PORT_MAX3100; in max3100_probe()
793 max3100s[i]->port.dev = &spi->dev; in max3100_probe()
794 retval = uart_add_one_port(&max3100_uart_driver, &max3100s[i]->port); in max3100_probe()
801 if (max3100s[i]->max3100_hw_suspend) in max3100_probe()
802 max3100s[i]->max3100_hw_suspend(1); in max3100_probe()
805 max3100_sr(max3100s[i], tx, &rx); in max3100_probe()
820 if (max3100s[i] == s) { in max3100_remove()
822 uart_remove_one_port(&max3100_uart_driver, &max3100s[i]->port); in max3100_remove()
823 kfree(max3100s[i]); in max3100_remove()
824 max3100s[i] = NULL; in max3100_remove()
832 if (max3100s[i]) { in max3100_remove()