Lines Matching refs:ps2if
22 struct ps2if { struct
33 struct ps2if *ps2if = dev_id; in altera_ps2_rxint() argument
37 while ((status = readl(ps2if->base)) & 0xffff0000) { in altera_ps2_rxint()
38 serio_interrupt(ps2if->io, status & 0xff, 0); in altera_ps2_rxint()
50 struct ps2if *ps2if = io->port_data; in altera_ps2_write() local
52 writel(val, ps2if->base); in altera_ps2_write()
58 struct ps2if *ps2if = io->port_data; in altera_ps2_open() local
61 while (readl(ps2if->base) & 0xffff0000) in altera_ps2_open()
64 writel(1, ps2if->base + 4); /* enable rx irq */ in altera_ps2_open()
70 struct ps2if *ps2if = io->port_data; in altera_ps2_close() local
72 writel(0, ps2if->base + 4); /* disable rx irq */ in altera_ps2_close()
80 struct ps2if *ps2if; in altera_ps2_probe() local
84 ps2if = devm_kzalloc(&pdev->dev, sizeof(struct ps2if), GFP_KERNEL); in altera_ps2_probe()
85 if (!ps2if) in altera_ps2_probe()
88 ps2if->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); in altera_ps2_probe()
89 if (IS_ERR(ps2if->base)) in altera_ps2_probe()
90 return PTR_ERR(ps2if->base); in altera_ps2_probe()
97 pdev->name, ps2if); in altera_ps2_probe()
113 serio->port_data = ps2if; in altera_ps2_probe()
115 ps2if->io = serio; in altera_ps2_probe()
117 dev_info(&pdev->dev, "base %p, irq %d\n", ps2if->base, irq); in altera_ps2_probe()
119 serio_register_port(ps2if->io); in altera_ps2_probe()
120 platform_set_drvdata(pdev, ps2if); in altera_ps2_probe()
130 struct ps2if *ps2if = platform_get_drvdata(pdev); in altera_ps2_remove() local
132 serio_unregister_port(ps2if->io); in altera_ps2_remove()