/*
- Altera University Program PS2 controller driver
- Based on sa1111ps2.c, which is:
- Copyright © 2002 Russell King
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
*/
#include <linux/module.h>
#include <linux/input.h>
#include <linux/serio.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/of.h>
#define DRV_NAME “altera_ps2”
struct ps2if {
struct serio *io;
void __iomem *base;
};
/*
-
Read all bytes waiting in the PS2 port. There should be
-
at the most one, but we loop for safety.
*/
static irqreturn_t a