// SPDX-License-Identifier: GPL-2.0-only /* * Altera University Program PS2 controller driver * * Copyright (C) 2008 Thomas Chou <thomas@wytron.com.tw> * * Based on sa1111ps2.c, which is: * Copyright (C) 2002 Russell King
*/
/* * Read all bytes waiting in the PS2 port. There should be * at the most one, but we loop for safety.
*/ static irqreturn_t altera_ps2_rxint(int irq, void *dev_id)
{ struct ps2if *ps2if = dev_id; unsignedint status;
irqreturn_t handled = IRQ_NONE;
while ((status = readl(ps2if->base)) & 0xffff0000) {
serio_interrupt(ps2if->io, status & 0xff, 0);
handled = IRQ_HANDLED;
}
return handled;
}
/* * Write a byte to the PS2 port.
*/ staticint altera_ps2_write(struct serio *io, unsignedchar val)
{ struct ps2if *ps2if = io->port_data;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.