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
85 ps2if = devm_kzalloc(&pdev->dev, sizeof(struct ps2if), GFP_KERNEL); in altera_ps2_probe()
86 if (!ps2if) in altera_ps2_probe()
90 ps2if->base = devm_ioremap_resource(&pdev->dev, res); in altera_ps2_probe()
91 if (IS_ERR(ps2if->base)) in altera_ps2_probe()
92 return PTR_ERR(ps2if->base); in altera_ps2_probe()
99 pdev->name, ps2if); in altera_ps2_probe()
115 serio->port_data = ps2if; in altera_ps2_probe()
117 ps2if->io = serio; in altera_ps2_probe()
119 dev_info(&pdev->dev, "base %p, irq %d\n", ps2if->base, irq); in altera_ps2_probe()
121 serio_register_port(ps2if->io); in altera_ps2_probe()
122 platform_set_drvdata(pdev, ps2if); in altera_ps2_probe()
132 struct ps2if *ps2if = platform_get_drvdata(pdev); in altera_ps2_remove() local
134 serio_unregister_port(ps2if->io); in altera_ps2_remove()