1*4882a593Smuzhiyun // SPDX-License-Identifier: GPL-2.0-or-later
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun * Xilinx XPS PS/2 device driver
4*4882a593Smuzhiyun *
5*4882a593Smuzhiyun * (c) 2005 MontaVista Software, Inc.
6*4882a593Smuzhiyun * (c) 2008 Xilinx, Inc.
7*4882a593Smuzhiyun */
8*4882a593Smuzhiyun
9*4882a593Smuzhiyun
10*4882a593Smuzhiyun #include <linux/module.h>
11*4882a593Smuzhiyun #include <linux/serio.h>
12*4882a593Smuzhiyun #include <linux/interrupt.h>
13*4882a593Smuzhiyun #include <linux/errno.h>
14*4882a593Smuzhiyun #include <linux/slab.h>
15*4882a593Smuzhiyun #include <linux/list.h>
16*4882a593Smuzhiyun #include <linux/io.h>
17*4882a593Smuzhiyun #include <linux/of_address.h>
18*4882a593Smuzhiyun #include <linux/of_device.h>
19*4882a593Smuzhiyun #include <linux/of_irq.h>
20*4882a593Smuzhiyun #include <linux/of_platform.h>
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun #define DRIVER_NAME "xilinx_ps2"
23*4882a593Smuzhiyun
24*4882a593Smuzhiyun /* Register offsets for the xps2 device */
25*4882a593Smuzhiyun #define XPS2_SRST_OFFSET 0x00000000 /* Software Reset register */
26*4882a593Smuzhiyun #define XPS2_STATUS_OFFSET 0x00000004 /* Status register */
27*4882a593Smuzhiyun #define XPS2_RX_DATA_OFFSET 0x00000008 /* Receive Data register */
28*4882a593Smuzhiyun #define XPS2_TX_DATA_OFFSET 0x0000000C /* Transmit Data register */
29*4882a593Smuzhiyun #define XPS2_GIER_OFFSET 0x0000002C /* Global Interrupt Enable reg */
30*4882a593Smuzhiyun #define XPS2_IPISR_OFFSET 0x00000030 /* Interrupt Status register */
31*4882a593Smuzhiyun #define XPS2_IPIER_OFFSET 0x00000038 /* Interrupt Enable register */
32*4882a593Smuzhiyun
33*4882a593Smuzhiyun /* Reset Register Bit Definitions */
34*4882a593Smuzhiyun #define XPS2_SRST_RESET 0x0000000A /* Software Reset */
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun /* Status Register Bit Positions */
37*4882a593Smuzhiyun #define XPS2_STATUS_RX_FULL 0x00000001 /* Receive Full */
38*4882a593Smuzhiyun #define XPS2_STATUS_TX_FULL 0x00000002 /* Transmit Full */
39*4882a593Smuzhiyun
40*4882a593Smuzhiyun /*
41*4882a593Smuzhiyun * Bit definitions for ISR/IER registers. Both the registers have the same bit
42*4882a593Smuzhiyun * definitions and are only defined once.
43*4882a593Smuzhiyun */
44*4882a593Smuzhiyun #define XPS2_IPIXR_WDT_TOUT 0x00000001 /* Watchdog Timeout Interrupt */
45*4882a593Smuzhiyun #define XPS2_IPIXR_TX_NOACK 0x00000002 /* Transmit No ACK Interrupt */
46*4882a593Smuzhiyun #define XPS2_IPIXR_TX_ACK 0x00000004 /* Transmit ACK (Data) Interrupt */
47*4882a593Smuzhiyun #define XPS2_IPIXR_RX_OVF 0x00000008 /* Receive Overflow Interrupt */
48*4882a593Smuzhiyun #define XPS2_IPIXR_RX_ERR 0x00000010 /* Receive Error Interrupt */
49*4882a593Smuzhiyun #define XPS2_IPIXR_RX_FULL 0x00000020 /* Receive Data Interrupt */
50*4882a593Smuzhiyun
51*4882a593Smuzhiyun /* Mask for all the Transmit Interrupts */
52*4882a593Smuzhiyun #define XPS2_IPIXR_TX_ALL (XPS2_IPIXR_TX_NOACK | XPS2_IPIXR_TX_ACK)
53*4882a593Smuzhiyun
54*4882a593Smuzhiyun /* Mask for all the Receive Interrupts */
55*4882a593Smuzhiyun #define XPS2_IPIXR_RX_ALL (XPS2_IPIXR_RX_OVF | XPS2_IPIXR_RX_ERR | \
56*4882a593Smuzhiyun XPS2_IPIXR_RX_FULL)
57*4882a593Smuzhiyun
58*4882a593Smuzhiyun /* Mask for all the Interrupts */
59*4882a593Smuzhiyun #define XPS2_IPIXR_ALL (XPS2_IPIXR_TX_ALL | XPS2_IPIXR_RX_ALL | \
60*4882a593Smuzhiyun XPS2_IPIXR_WDT_TOUT)
61*4882a593Smuzhiyun
62*4882a593Smuzhiyun /* Global Interrupt Enable mask */
63*4882a593Smuzhiyun #define XPS2_GIER_GIE_MASK 0x80000000
64*4882a593Smuzhiyun
65*4882a593Smuzhiyun struct xps2data {
66*4882a593Smuzhiyun int irq;
67*4882a593Smuzhiyun spinlock_t lock;
68*4882a593Smuzhiyun void __iomem *base_address; /* virt. address of control registers */
69*4882a593Smuzhiyun unsigned int flags;
70*4882a593Smuzhiyun struct serio *serio; /* serio */
71*4882a593Smuzhiyun struct device *dev;
72*4882a593Smuzhiyun };
73*4882a593Smuzhiyun
74*4882a593Smuzhiyun /************************************/
75*4882a593Smuzhiyun /* XPS PS/2 data transmission calls */
76*4882a593Smuzhiyun /************************************/
77*4882a593Smuzhiyun
78*4882a593Smuzhiyun /**
79*4882a593Smuzhiyun * xps2_recv() - attempts to receive a byte from the PS/2 port.
80*4882a593Smuzhiyun * @drvdata: pointer to ps2 device private data structure
81*4882a593Smuzhiyun * @byte: address where the read data will be copied
82*4882a593Smuzhiyun *
83*4882a593Smuzhiyun * If there is any data available in the PS/2 receiver, this functions reads
84*4882a593Smuzhiyun * the data, otherwise it returns error.
85*4882a593Smuzhiyun */
xps2_recv(struct xps2data * drvdata,u8 * byte)86*4882a593Smuzhiyun static int xps2_recv(struct xps2data *drvdata, u8 *byte)
87*4882a593Smuzhiyun {
88*4882a593Smuzhiyun u32 sr;
89*4882a593Smuzhiyun int status = -1;
90*4882a593Smuzhiyun
91*4882a593Smuzhiyun /* If there is data available in the PS/2 receiver, read it */
92*4882a593Smuzhiyun sr = in_be32(drvdata->base_address + XPS2_STATUS_OFFSET);
93*4882a593Smuzhiyun if (sr & XPS2_STATUS_RX_FULL) {
94*4882a593Smuzhiyun *byte = in_be32(drvdata->base_address + XPS2_RX_DATA_OFFSET);
95*4882a593Smuzhiyun status = 0;
96*4882a593Smuzhiyun }
97*4882a593Smuzhiyun
98*4882a593Smuzhiyun return status;
99*4882a593Smuzhiyun }
100*4882a593Smuzhiyun
101*4882a593Smuzhiyun /*********************/
102*4882a593Smuzhiyun /* Interrupt handler */
103*4882a593Smuzhiyun /*********************/
xps2_interrupt(int irq,void * dev_id)104*4882a593Smuzhiyun static irqreturn_t xps2_interrupt(int irq, void *dev_id)
105*4882a593Smuzhiyun {
106*4882a593Smuzhiyun struct xps2data *drvdata = dev_id;
107*4882a593Smuzhiyun u32 intr_sr;
108*4882a593Smuzhiyun u8 c;
109*4882a593Smuzhiyun int status;
110*4882a593Smuzhiyun
111*4882a593Smuzhiyun /* Get the PS/2 interrupts and clear them */
112*4882a593Smuzhiyun intr_sr = in_be32(drvdata->base_address + XPS2_IPISR_OFFSET);
113*4882a593Smuzhiyun out_be32(drvdata->base_address + XPS2_IPISR_OFFSET, intr_sr);
114*4882a593Smuzhiyun
115*4882a593Smuzhiyun /* Check which interrupt is active */
116*4882a593Smuzhiyun if (intr_sr & XPS2_IPIXR_RX_OVF)
117*4882a593Smuzhiyun dev_warn(drvdata->dev, "receive overrun error\n");
118*4882a593Smuzhiyun
119*4882a593Smuzhiyun if (intr_sr & XPS2_IPIXR_RX_ERR)
120*4882a593Smuzhiyun drvdata->flags |= SERIO_PARITY;
121*4882a593Smuzhiyun
122*4882a593Smuzhiyun if (intr_sr & (XPS2_IPIXR_TX_NOACK | XPS2_IPIXR_WDT_TOUT))
123*4882a593Smuzhiyun drvdata->flags |= SERIO_TIMEOUT;
124*4882a593Smuzhiyun
125*4882a593Smuzhiyun if (intr_sr & XPS2_IPIXR_RX_FULL) {
126*4882a593Smuzhiyun status = xps2_recv(drvdata, &c);
127*4882a593Smuzhiyun
128*4882a593Smuzhiyun /* Error, if a byte is not received */
129*4882a593Smuzhiyun if (status) {
130*4882a593Smuzhiyun dev_err(drvdata->dev,
131*4882a593Smuzhiyun "wrong rcvd byte count (%d)\n", status);
132*4882a593Smuzhiyun } else {
133*4882a593Smuzhiyun serio_interrupt(drvdata->serio, c, drvdata->flags);
134*4882a593Smuzhiyun drvdata->flags = 0;
135*4882a593Smuzhiyun }
136*4882a593Smuzhiyun }
137*4882a593Smuzhiyun
138*4882a593Smuzhiyun return IRQ_HANDLED;
139*4882a593Smuzhiyun }
140*4882a593Smuzhiyun
141*4882a593Smuzhiyun /*******************/
142*4882a593Smuzhiyun /* serio callbacks */
143*4882a593Smuzhiyun /*******************/
144*4882a593Smuzhiyun
145*4882a593Smuzhiyun /**
146*4882a593Smuzhiyun * sxps2_write() - sends a byte out through the PS/2 port.
147*4882a593Smuzhiyun * @pserio: pointer to the serio structure of the PS/2 port
148*4882a593Smuzhiyun * @c: data that needs to be written to the PS/2 port
149*4882a593Smuzhiyun *
150*4882a593Smuzhiyun * This function checks if the PS/2 transmitter is empty and sends a byte.
151*4882a593Smuzhiyun * Otherwise it returns error. Transmission fails only when nothing is connected
152*4882a593Smuzhiyun * to the PS/2 port. Thats why, we do not try to resend the data in case of a
153*4882a593Smuzhiyun * failure.
154*4882a593Smuzhiyun */
sxps2_write(struct serio * pserio,unsigned char c)155*4882a593Smuzhiyun static int sxps2_write(struct serio *pserio, unsigned char c)
156*4882a593Smuzhiyun {
157*4882a593Smuzhiyun struct xps2data *drvdata = pserio->port_data;
158*4882a593Smuzhiyun unsigned long flags;
159*4882a593Smuzhiyun u32 sr;
160*4882a593Smuzhiyun int status = -1;
161*4882a593Smuzhiyun
162*4882a593Smuzhiyun spin_lock_irqsave(&drvdata->lock, flags);
163*4882a593Smuzhiyun
164*4882a593Smuzhiyun /* If the PS/2 transmitter is empty send a byte of data */
165*4882a593Smuzhiyun sr = in_be32(drvdata->base_address + XPS2_STATUS_OFFSET);
166*4882a593Smuzhiyun if (!(sr & XPS2_STATUS_TX_FULL)) {
167*4882a593Smuzhiyun out_be32(drvdata->base_address + XPS2_TX_DATA_OFFSET, c);
168*4882a593Smuzhiyun status = 0;
169*4882a593Smuzhiyun }
170*4882a593Smuzhiyun
171*4882a593Smuzhiyun spin_unlock_irqrestore(&drvdata->lock, flags);
172*4882a593Smuzhiyun
173*4882a593Smuzhiyun return status;
174*4882a593Smuzhiyun }
175*4882a593Smuzhiyun
176*4882a593Smuzhiyun /**
177*4882a593Smuzhiyun * sxps2_open() - called when a port is opened by the higher layer.
178*4882a593Smuzhiyun * @pserio: pointer to the serio structure of the PS/2 device
179*4882a593Smuzhiyun *
180*4882a593Smuzhiyun * This function requests irq and enables interrupts for the PS/2 device.
181*4882a593Smuzhiyun */
sxps2_open(struct serio * pserio)182*4882a593Smuzhiyun static int sxps2_open(struct serio *pserio)
183*4882a593Smuzhiyun {
184*4882a593Smuzhiyun struct xps2data *drvdata = pserio->port_data;
185*4882a593Smuzhiyun int error;
186*4882a593Smuzhiyun u8 c;
187*4882a593Smuzhiyun
188*4882a593Smuzhiyun error = request_irq(drvdata->irq, &xps2_interrupt, 0,
189*4882a593Smuzhiyun DRIVER_NAME, drvdata);
190*4882a593Smuzhiyun if (error) {
191*4882a593Smuzhiyun dev_err(drvdata->dev,
192*4882a593Smuzhiyun "Couldn't allocate interrupt %d\n", drvdata->irq);
193*4882a593Smuzhiyun return error;
194*4882a593Smuzhiyun }
195*4882a593Smuzhiyun
196*4882a593Smuzhiyun /* start reception by enabling the interrupts */
197*4882a593Smuzhiyun out_be32(drvdata->base_address + XPS2_GIER_OFFSET, XPS2_GIER_GIE_MASK);
198*4882a593Smuzhiyun out_be32(drvdata->base_address + XPS2_IPIER_OFFSET, XPS2_IPIXR_RX_ALL);
199*4882a593Smuzhiyun (void)xps2_recv(drvdata, &c);
200*4882a593Smuzhiyun
201*4882a593Smuzhiyun return 0; /* success */
202*4882a593Smuzhiyun }
203*4882a593Smuzhiyun
204*4882a593Smuzhiyun /**
205*4882a593Smuzhiyun * sxps2_close() - frees the interrupt.
206*4882a593Smuzhiyun * @pserio: pointer to the serio structure of the PS/2 device
207*4882a593Smuzhiyun *
208*4882a593Smuzhiyun * This function frees the irq and disables interrupts for the PS/2 device.
209*4882a593Smuzhiyun */
sxps2_close(struct serio * pserio)210*4882a593Smuzhiyun static void sxps2_close(struct serio *pserio)
211*4882a593Smuzhiyun {
212*4882a593Smuzhiyun struct xps2data *drvdata = pserio->port_data;
213*4882a593Smuzhiyun
214*4882a593Smuzhiyun /* Disable the PS2 interrupts */
215*4882a593Smuzhiyun out_be32(drvdata->base_address + XPS2_GIER_OFFSET, 0x00);
216*4882a593Smuzhiyun out_be32(drvdata->base_address + XPS2_IPIER_OFFSET, 0x00);
217*4882a593Smuzhiyun free_irq(drvdata->irq, drvdata);
218*4882a593Smuzhiyun }
219*4882a593Smuzhiyun
220*4882a593Smuzhiyun /**
221*4882a593Smuzhiyun * xps2_of_probe - probe method for the PS/2 device.
222*4882a593Smuzhiyun * @of_dev: pointer to OF device structure
223*4882a593Smuzhiyun * @match: pointer to the structure used for matching a device
224*4882a593Smuzhiyun *
225*4882a593Smuzhiyun * This function probes the PS/2 device in the device tree.
226*4882a593Smuzhiyun * It initializes the driver data structure and the hardware.
227*4882a593Smuzhiyun * It returns 0, if the driver is bound to the PS/2 device, or a negative
228*4882a593Smuzhiyun * value if there is an error.
229*4882a593Smuzhiyun */
xps2_of_probe(struct platform_device * ofdev)230*4882a593Smuzhiyun static int xps2_of_probe(struct platform_device *ofdev)
231*4882a593Smuzhiyun {
232*4882a593Smuzhiyun struct resource r_mem; /* IO mem resources */
233*4882a593Smuzhiyun struct xps2data *drvdata;
234*4882a593Smuzhiyun struct serio *serio;
235*4882a593Smuzhiyun struct device *dev = &ofdev->dev;
236*4882a593Smuzhiyun resource_size_t remap_size, phys_addr;
237*4882a593Smuzhiyun unsigned int irq;
238*4882a593Smuzhiyun int error;
239*4882a593Smuzhiyun
240*4882a593Smuzhiyun dev_info(dev, "Device Tree Probing \'%pOFn\'\n", dev->of_node);
241*4882a593Smuzhiyun
242*4882a593Smuzhiyun /* Get iospace for the device */
243*4882a593Smuzhiyun error = of_address_to_resource(dev->of_node, 0, &r_mem);
244*4882a593Smuzhiyun if (error) {
245*4882a593Smuzhiyun dev_err(dev, "invalid address\n");
246*4882a593Smuzhiyun return error;
247*4882a593Smuzhiyun }
248*4882a593Smuzhiyun
249*4882a593Smuzhiyun /* Get IRQ for the device */
250*4882a593Smuzhiyun irq = irq_of_parse_and_map(dev->of_node, 0);
251*4882a593Smuzhiyun if (!irq) {
252*4882a593Smuzhiyun dev_err(dev, "no IRQ found\n");
253*4882a593Smuzhiyun return -ENODEV;
254*4882a593Smuzhiyun }
255*4882a593Smuzhiyun
256*4882a593Smuzhiyun drvdata = kzalloc(sizeof(struct xps2data), GFP_KERNEL);
257*4882a593Smuzhiyun serio = kzalloc(sizeof(struct serio), GFP_KERNEL);
258*4882a593Smuzhiyun if (!drvdata || !serio) {
259*4882a593Smuzhiyun error = -ENOMEM;
260*4882a593Smuzhiyun goto failed1;
261*4882a593Smuzhiyun }
262*4882a593Smuzhiyun
263*4882a593Smuzhiyun spin_lock_init(&drvdata->lock);
264*4882a593Smuzhiyun drvdata->irq = irq;
265*4882a593Smuzhiyun drvdata->serio = serio;
266*4882a593Smuzhiyun drvdata->dev = dev;
267*4882a593Smuzhiyun
268*4882a593Smuzhiyun phys_addr = r_mem.start;
269*4882a593Smuzhiyun remap_size = resource_size(&r_mem);
270*4882a593Smuzhiyun if (!request_mem_region(phys_addr, remap_size, DRIVER_NAME)) {
271*4882a593Smuzhiyun dev_err(dev, "Couldn't lock memory region at 0x%08llX\n",
272*4882a593Smuzhiyun (unsigned long long)phys_addr);
273*4882a593Smuzhiyun error = -EBUSY;
274*4882a593Smuzhiyun goto failed1;
275*4882a593Smuzhiyun }
276*4882a593Smuzhiyun
277*4882a593Smuzhiyun /* Fill in configuration data and add them to the list */
278*4882a593Smuzhiyun drvdata->base_address = ioremap(phys_addr, remap_size);
279*4882a593Smuzhiyun if (drvdata->base_address == NULL) {
280*4882a593Smuzhiyun dev_err(dev, "Couldn't ioremap memory at 0x%08llX\n",
281*4882a593Smuzhiyun (unsigned long long)phys_addr);
282*4882a593Smuzhiyun error = -EFAULT;
283*4882a593Smuzhiyun goto failed2;
284*4882a593Smuzhiyun }
285*4882a593Smuzhiyun
286*4882a593Smuzhiyun /* Disable all the interrupts, just in case */
287*4882a593Smuzhiyun out_be32(drvdata->base_address + XPS2_IPIER_OFFSET, 0);
288*4882a593Smuzhiyun
289*4882a593Smuzhiyun /*
290*4882a593Smuzhiyun * Reset the PS2 device and abort any current transaction,
291*4882a593Smuzhiyun * to make sure we have the PS2 in a good state.
292*4882a593Smuzhiyun */
293*4882a593Smuzhiyun out_be32(drvdata->base_address + XPS2_SRST_OFFSET, XPS2_SRST_RESET);
294*4882a593Smuzhiyun
295*4882a593Smuzhiyun dev_info(dev, "Xilinx PS2 at 0x%08llX mapped to 0x%p, irq=%d\n",
296*4882a593Smuzhiyun (unsigned long long)phys_addr, drvdata->base_address,
297*4882a593Smuzhiyun drvdata->irq);
298*4882a593Smuzhiyun
299*4882a593Smuzhiyun serio->id.type = SERIO_8042;
300*4882a593Smuzhiyun serio->write = sxps2_write;
301*4882a593Smuzhiyun serio->open = sxps2_open;
302*4882a593Smuzhiyun serio->close = sxps2_close;
303*4882a593Smuzhiyun serio->port_data = drvdata;
304*4882a593Smuzhiyun serio->dev.parent = dev;
305*4882a593Smuzhiyun snprintf(serio->name, sizeof(serio->name),
306*4882a593Smuzhiyun "Xilinx XPS PS/2 at %08llX", (unsigned long long)phys_addr);
307*4882a593Smuzhiyun snprintf(serio->phys, sizeof(serio->phys),
308*4882a593Smuzhiyun "xilinxps2/serio at %08llX", (unsigned long long)phys_addr);
309*4882a593Smuzhiyun
310*4882a593Smuzhiyun serio_register_port(serio);
311*4882a593Smuzhiyun
312*4882a593Smuzhiyun platform_set_drvdata(ofdev, drvdata);
313*4882a593Smuzhiyun return 0; /* success */
314*4882a593Smuzhiyun
315*4882a593Smuzhiyun failed2:
316*4882a593Smuzhiyun release_mem_region(phys_addr, remap_size);
317*4882a593Smuzhiyun failed1:
318*4882a593Smuzhiyun kfree(serio);
319*4882a593Smuzhiyun kfree(drvdata);
320*4882a593Smuzhiyun
321*4882a593Smuzhiyun return error;
322*4882a593Smuzhiyun }
323*4882a593Smuzhiyun
324*4882a593Smuzhiyun /**
325*4882a593Smuzhiyun * xps2_of_remove - unbinds the driver from the PS/2 device.
326*4882a593Smuzhiyun * @of_dev: pointer to OF device structure
327*4882a593Smuzhiyun *
328*4882a593Smuzhiyun * This function is called if a device is physically removed from the system or
329*4882a593Smuzhiyun * if the driver module is being unloaded. It frees any resources allocated to
330*4882a593Smuzhiyun * the device.
331*4882a593Smuzhiyun */
xps2_of_remove(struct platform_device * of_dev)332*4882a593Smuzhiyun static int xps2_of_remove(struct platform_device *of_dev)
333*4882a593Smuzhiyun {
334*4882a593Smuzhiyun struct xps2data *drvdata = platform_get_drvdata(of_dev);
335*4882a593Smuzhiyun struct resource r_mem; /* IO mem resources */
336*4882a593Smuzhiyun
337*4882a593Smuzhiyun serio_unregister_port(drvdata->serio);
338*4882a593Smuzhiyun iounmap(drvdata->base_address);
339*4882a593Smuzhiyun
340*4882a593Smuzhiyun /* Get iospace of the device */
341*4882a593Smuzhiyun if (of_address_to_resource(of_dev->dev.of_node, 0, &r_mem))
342*4882a593Smuzhiyun dev_err(drvdata->dev, "invalid address\n");
343*4882a593Smuzhiyun else
344*4882a593Smuzhiyun release_mem_region(r_mem.start, resource_size(&r_mem));
345*4882a593Smuzhiyun
346*4882a593Smuzhiyun kfree(drvdata);
347*4882a593Smuzhiyun
348*4882a593Smuzhiyun return 0;
349*4882a593Smuzhiyun }
350*4882a593Smuzhiyun
351*4882a593Smuzhiyun /* Match table for of_platform binding */
352*4882a593Smuzhiyun static const struct of_device_id xps2_of_match[] = {
353*4882a593Smuzhiyun { .compatible = "xlnx,xps-ps2-1.00.a", },
354*4882a593Smuzhiyun { /* end of list */ },
355*4882a593Smuzhiyun };
356*4882a593Smuzhiyun MODULE_DEVICE_TABLE(of, xps2_of_match);
357*4882a593Smuzhiyun
358*4882a593Smuzhiyun static struct platform_driver xps2_of_driver = {
359*4882a593Smuzhiyun .driver = {
360*4882a593Smuzhiyun .name = DRIVER_NAME,
361*4882a593Smuzhiyun .of_match_table = xps2_of_match,
362*4882a593Smuzhiyun },
363*4882a593Smuzhiyun .probe = xps2_of_probe,
364*4882a593Smuzhiyun .remove = xps2_of_remove,
365*4882a593Smuzhiyun };
366*4882a593Smuzhiyun module_platform_driver(xps2_of_driver);
367*4882a593Smuzhiyun
368*4882a593Smuzhiyun MODULE_AUTHOR("Xilinx, Inc.");
369*4882a593Smuzhiyun MODULE_DESCRIPTION("Xilinx XPS PS/2 driver");
370*4882a593Smuzhiyun MODULE_LICENSE("GPL");
371*4882a593Smuzhiyun
372