Lines Matching refs:ps2if
25 struct ps2if { struct
36 struct ps2if *ps2if = dev_id; in altera_ps2_rxint() argument
40 while ((status = readl(ps2if->base)) & 0xffff0000) { in altera_ps2_rxint()
41 serio_interrupt(ps2if->io, status & 0xff, 0); in altera_ps2_rxint()
53 struct ps2if *ps2if = io->port_data; in altera_ps2_write() local
55 writel(val, ps2if->base); in altera_ps2_write()
61 struct ps2if *ps2if = io->port_data; in altera_ps2_open() local
64 while (readl(ps2if->base) & 0xffff0000) in altera_ps2_open()
67 writel(1, ps2if->base + 4); /* enable rx irq */ in altera_ps2_open()
73 struct ps2if *ps2if = io->port_data; in altera_ps2_close() local
75 writel(0, ps2if->base + 4); /* disable rx irq */ in altera_ps2_close()
83 struct ps2if *ps2if; in altera_ps2_probe() local
88 ps2if = devm_kzalloc(&pdev->dev, sizeof(struct ps2if), GFP_KERNEL); in altera_ps2_probe()
89 if (!ps2if) in altera_ps2_probe()
93 ps2if->base = devm_ioremap_resource(&pdev->dev, res); in altera_ps2_probe()
94 if (IS_ERR(ps2if->base)) in altera_ps2_probe()
95 return PTR_ERR(ps2if->base); in altera_ps2_probe()
102 pdev->name, ps2if); in altera_ps2_probe()
118 serio->port_data = ps2if; in altera_ps2_probe()
120 ps2if->io = serio; in altera_ps2_probe()
122 dev_info(&pdev->dev, "base %p, irq %d\n", ps2if->base, irq); in altera_ps2_probe()
124 serio_register_port(ps2if->io); in altera_ps2_probe()
125 platform_set_drvdata(pdev, ps2if); in altera_ps2_probe()
135 struct ps2if *ps2if = platform_get_drvdata(pdev); in altera_ps2_remove() local
137 serio_unregister_port(ps2if->io); in altera_ps2_remove()