Lines Matching refs:link

108 static void quirk_setup_brainboxes_0104(struct pcmcia_device *link, struct uart_8250_port *uart)  in quirk_setup_brainboxes_0104()  argument
113 static int quirk_post_ibm(struct pcmcia_device *link) in quirk_post_ibm() argument
118 ret = pcmcia_read_config_byte(link, 0x800, &val); in quirk_post_ibm()
122 ret = pcmcia_write_config_byte(link, 0x800, val | 1); in quirk_post_ibm()
135 static void quirk_config_nokia(struct pcmcia_device *link) in quirk_config_nokia() argument
137 struct serial_info *info = link->priv; in quirk_config_nokia()
143 static void quirk_wakeup_oxsemi(struct pcmcia_device *link) in quirk_wakeup_oxsemi() argument
145 struct serial_info *info = link->priv; in quirk_wakeup_oxsemi()
157 static void quirk_wakeup_possio_gcc(struct pcmcia_device *link) in quirk_wakeup_possio_gcc() argument
159 struct serial_info *info = link->priv; in quirk_wakeup_possio_gcc()
180 static void quirk_config_socket(struct pcmcia_device *link) in quirk_config_socket() argument
182 struct serial_info *info = link->priv; in quirk_config_socket()
185 link->config_flags |= CONF_ENABLE_ESR; in quirk_config_socket()
261 static int serial_config(struct pcmcia_device *link);
264 static void serial_remove(struct pcmcia_device *link) in serial_remove() argument
266 struct serial_info *info = link->priv; in serial_remove()
269 dev_dbg(&link->dev, "serial_release\n"); in serial_remove()
278 pcmcia_disable_device(link); in serial_remove()
281 static int serial_suspend(struct pcmcia_device *link) in serial_suspend() argument
283 struct serial_info *info = link->priv; in serial_suspend()
292 static int serial_resume(struct pcmcia_device *link) in serial_resume() argument
294 struct serial_info *info = link->priv; in serial_resume()
301 info->quirk->wakeup(link); in serial_resume()
306 static int serial_probe(struct pcmcia_device *link) in serial_probe() argument
311 dev_dbg(&link->dev, "serial_attach()\n"); in serial_probe()
317 info->p_dev = link; in serial_probe()
318 link->priv = info; in serial_probe()
320 link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO; in serial_probe()
322 link->config_flags |= CONF_ENABLE_SPKR; in serial_probe()
324 ret = serial_config(link); in serial_probe()
335 static void serial_detach(struct pcmcia_device *link) in serial_detach() argument
337 struct serial_info *info = link->priv; in serial_detach()
339 dev_dbg(&link->dev, "serial_detach\n"); in serial_detach()
344 serial_remove(link); in serial_detach()
449 static int simple_config(struct pcmcia_device *link) in simple_config() argument
451 struct serial_info *info = link->priv; in simple_config()
458 link->config_flags |= CONF_AUTO_SET_VPP; in simple_config()
460 if (!pcmcia_loop_config(link, simple_config_check, &try)) in simple_config()
468 ret = pcmcia_loop_config(link, simple_config_check_notpicky, NULL); in simple_config()
470 dev_warn(&link->dev, "no usable port range found, giving up\n"); in simple_config()
476 link->config_index &= ~(0x08); in simple_config()
482 info->quirk->config(link); in simple_config()
484 ret = pcmcia_enable_device(link); in simple_config()
487 return setup_serial(link, info, link->resource[0]->start, link->irq); in simple_config()
533 static int multi_config(struct pcmcia_device *link) in multi_config() argument
535 struct serial_info *info = link->priv; in multi_config()
539 if (!pcmcia_loop_config(link, multi_config_check, &info->multi)) in multi_config()
540 base2 = link->resource[0]->start + 8; in multi_config()
544 if (pcmcia_loop_config(link, multi_config_check_notpicky, in multi_config()
546 dev_warn(&link->dev, in multi_config()
552 if (!link->irq) in multi_config()
553 dev_warn(&link->dev, "no usable IRQ found, continuing...\n"); in multi_config()
559 info->quirk->config(link); in multi_config()
561 i = pcmcia_enable_device(link); in multi_config()
571 if (link->config_index == 1 || in multi_config()
572 link->config_index == 3) { in multi_config()
573 setup_serial(link, info, base2, link->irq); in multi_config()
574 base2 = link->resource[0]->start; in multi_config()
576 setup_serial(link, info, link->resource[0]->start, in multi_config()
577 link->irq); in multi_config()
586 info->quirk->wakeup(link); in multi_config()
591 setup_serial(link, info, link->resource[0]->start, link->irq); in multi_config()
593 setup_serial(link, info, base2 + (8 * i), in multi_config()
594 link->irq); in multi_config()
616 static int serial_config(struct pcmcia_device *link) in serial_config() argument
618 struct serial_info *info = link->priv; in serial_config()
621 dev_dbg(&link->dev, "serial_config\n"); in serial_config()
624 info->multi = (link->socket->functions > 1); in serial_config()
627 info->manfid = link->manf_id; in serial_config()
628 info->prodid = link->card_id; in serial_config()
644 (link->has_func_id) && in serial_config()
645 (link->socket->pcmcia_pfc == 0) && in serial_config()
646 ((link->func_id == CISTPL_FUNCID_MULTI) || in serial_config()
647 (link->func_id == CISTPL_FUNCID_SERIAL))) { in serial_config()
648 if (pcmcia_loop_config(link, serial_check_for_multi, info)) in serial_config()
658 dev_info(&link->dev, in serial_config()
660 link->manf_id, link->card_id, in serial_config()
661 link->socket->pcmcia_pfc, info->multi, info->quirk); in serial_config()
662 if (link->socket->pcmcia_pfc) in serial_config()
663 i = pfc_config(link); in serial_config()
665 i = multi_config(link); in serial_config()
667 i = simple_config(link); in serial_config()
677 if (info->quirk->post(link)) in serial_config()
683 dev_warn(&link->dev, "failed to initialize\n"); in serial_config()
684 serial_remove(link); in serial_config()