rxflags = (status & APBPS2_STATUS_PE) ? SERIO_PARITY : 0;
rxflags |= (status & APBPS2_STATUS_FE) ? SERIO_FRAME : 0;
- /* clear error bits? */
+ /* Clear error bits */
if (rxflags)
iowrite32be(0, &priv->regs->status);
static int apbps2_write(struct serio *io, unsigned char val)
{
struct apbps2_priv *priv = io->port_data;
- unsigned int tleft = 10000; /* timeout in 100ms */
+ unsigned int tleft = 10000; /* Timeout in 100ms */
- /* delay until PS/2 controller has room for more chars */
+ /* Delay until PS/2 controller has room for more chars */
while ((ioread32be(&priv->regs->status) & APBPS2_STATUS_TF) && tleft--)
udelay(10);
struct apbps2_priv *priv = io->port_data;
int limit;
- /* clear error flags */
+ /* Clear error flags */
iowrite32be(0, &priv->regs->status);
/* Clear old data if available (unlikely) */
while ((ioread32be(&priv->regs->status) & APBPS2_STATUS_DR) && --limit)
ioread32be(&priv->regs->data);
- /* Enable reciever and it's interrupt */
+ /* Enable receiver and its interrupt */
iowrite32be(APBPS2_CTRL_RE | APBPS2_CTRL_RI, &priv->regs->ctrl);
return 0;
{
struct apbps2_priv *priv = io->port_data;
- /* stop interrupts at PS/2 HW level */
+ /* Stop interrupts at PS/2 HW level */
iowrite32be(0, &priv->regs->ctrl);
}
return -ENOMEM;
}
- /* Find Device Address */
+ /* Find device address */
priv->regs = devm_platform_get_and_ioremap_resource(ofdev, 0, NULL);
if (IS_ERR(priv->regs))
return PTR_ERR(priv->regs);