linux/drivers/input/serio/sun4i-ps2.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 *	Driver for Allwinner A10 PS2 host controller
 *
 *	Author: Vishnu Patekar <[email protected]>
 *		Aaron.maoye <[email protected]>
 */

#include <linux/module.h>
#include <linux/serio.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/clk.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>

#define DRIVER_NAME

/* register offset definitions */
#define PS2_REG_GCTL
#define PS2_REG_DATA
#define PS2_REG_LCTL
#define PS2_REG_LSTS
#define PS2_REG_FCTL
#define PS2_REG_FSTS
#define PS2_REG_CLKDR

/*  PS2 GLOBAL CONTROL REGISTER PS2_GCTL */
#define PS2_GCTL_INTFLAG
#define PS2_GCTL_INTEN
#define PS2_GCTL_RESET
#define PS2_GCTL_MASTER
#define PS2_GCTL_BUSEN

/* PS2 LINE CONTROL REGISTER */
#define PS2_LCTL_NOACK
#define PS2_LCTL_TXDTOEN
#define PS2_LCTL_STOPERREN
#define PS2_LCTL_ACKERREN
#define PS2_LCTL_PARERREN
#define PS2_LCTL_RXDTOEN

/* PS2 LINE STATUS REGISTER */
#define PS2_LSTS_TXTDO
#define PS2_LSTS_STOPERR
#define PS2_LSTS_ACKERR
#define PS2_LSTS_PARERR
#define PS2_LSTS_RXTDO

#define PS2_LINE_ERROR_BIT

/* PS2 FIFO CONTROL REGISTER */
#define PS2_FCTL_TXRST
#define PS2_FCTL_RXRST
#define PS2_FCTL_TXUFIEN
#define PS2_FCTL_TXOFIEN
#define PS2_FCTL_TXRDYIEN
#define PS2_FCTL_RXUFIEN
#define PS2_FCTL_RXOFIEN
#define PS2_FCTL_RXRDYIEN

/* PS2 FIFO STATUS REGISTER */
#define PS2_FSTS_TXUF
#define PS2_FSTS_TXOF
#define PS2_FSTS_TXRDY
#define PS2_FSTS_RXUF
#define PS2_FSTS_RXOF
#define PS2_FSTS_RXRDY

#define PS2_FIFO_ERROR_BIT

#define PS2_SAMPLE_CLK
#define PS2_SCLK

struct sun4i_ps2data {};

static irqreturn_t sun4i_ps2_interrupt(int irq, void *dev_id)
{}

static int sun4i_ps2_open(struct serio *serio)
{}

static void sun4i_ps2_close(struct serio *serio)
{}

static int sun4i_ps2_write(struct serio *serio, unsigned char val)
{}

static int sun4i_ps2_probe(struct platform_device *pdev)
{}

static void sun4i_ps2_remove(struct platform_device *pdev)
{}

static const struct of_device_id sun4i_ps2_match[] =;

MODULE_DEVICE_TABLE(of, sun4i_ps2_match);

static struct platform_driver sun4i_ps2_driver =;
module_platform_driver();

MODULE_AUTHOR();
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();