Lines Matching refs:p
81 void parport_gsc_save_state(struct parport *p, struct parport_state *s) in parport_gsc_save_state() argument
83 s->u.pc.ctr = parport_readb (CONTROL (p)); in parport_gsc_save_state()
86 void parport_gsc_restore_state(struct parport *p, struct parport_state *s) in parport_gsc_restore_state() argument
88 parport_writeb (s->u.pc.ctr, CONTROL (p)); in parport_gsc_restore_state()
235 struct parport *p = &tmp; in parport_gsc_probe_port() local
252 p->base = base; in parport_gsc_probe_port()
253 p->base_hi = base_hi; in parport_gsc_probe_port()
254 p->irq = irq; in parport_gsc_probe_port()
255 p->modes = PARPORT_MODE_PCSPP | PARPORT_MODE_SAFEININT; in parport_gsc_probe_port()
256 p->ops = ops; in parport_gsc_probe_port()
257 p->private_data = priv; in parport_gsc_probe_port()
258 p->physport = p; in parport_gsc_probe_port()
259 if (!parport_SPP_supported (p)) { in parport_gsc_probe_port()
265 parport_PS2_supported (p); in parport_gsc_probe_port()
267 if (!(p = parport_register_port(base, PARPORT_IRQ_NONE, in parport_gsc_probe_port()
274 p->dev = &padev->dev; in parport_gsc_probe_port()
275 p->base_hi = base_hi; in parport_gsc_probe_port()
276 p->modes = tmp.modes; in parport_gsc_probe_port()
277 p->size = (p->modes & PARPORT_MODE_EPP)?8:3; in parport_gsc_probe_port()
278 p->private_data = priv; in parport_gsc_probe_port()
280 pr_info("%s: PC-style at 0x%lx", p->name, p->base); in parport_gsc_probe_port()
281 p->irq = irq; in parport_gsc_probe_port()
282 if (p->irq == PARPORT_IRQ_AUTO) { in parport_gsc_probe_port()
283 p->irq = PARPORT_IRQ_NONE; in parport_gsc_probe_port()
285 if (p->irq != PARPORT_IRQ_NONE) in parport_gsc_probe_port()
286 pr_cont(", irq %d", p->irq); in parport_gsc_probe_port()
291 if (p->modes & PARPORT_MODE_##x) \ in parport_gsc_probe_port()
306 if (p->irq != PARPORT_IRQ_NONE) { in parport_gsc_probe_port()
307 if (request_irq (p->irq, parport_irq_handler, in parport_gsc_probe_port()
308 0, p->name, p)) { in parport_gsc_probe_port()
310 p->name, p->irq); in parport_gsc_probe_port()
311 p->irq = PARPORT_IRQ_NONE; in parport_gsc_probe_port()
317 parport_gsc_write_data(p, 0); in parport_gsc_probe_port()
318 parport_gsc_data_forward (p); in parport_gsc_probe_port()
323 parport_announce_port (p); in parport_gsc_probe_port()
325 return p; in parport_gsc_probe_port()
335 struct parport *p; in parport_init_chip() local
359 p = parport_gsc_probe_port(port, 0, dev->irq, dev); in parport_init_chip()
360 if (p) in parport_init_chip()
362 dev_set_drvdata(&dev->dev, p); in parport_init_chip()
369 struct parport *p = dev_get_drvdata(&dev->dev); in parport_remove_chip() local
370 if (p) { in parport_remove_chip()
371 struct parport_operations *ops = p->ops; in parport_remove_chip()
372 parport_remove_port(p); in parport_remove_chip()
373 if (p->irq != PARPORT_IRQ_NONE) in parport_remove_chip()
374 free_irq(p->irq, p); in parport_remove_chip()
375 kfree (p->private_data); in parport_remove_chip()
376 parport_put_port(p); in parport_remove_chip()