#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/input.h>
#include <linux/input/sh_keysc.h>
#include <linux/bitmap.h>
#include <linux/pm_runtime.h>
#include <linux/io.h>
#include <linux/slab.h>
static const struct { … } sh_keysc_mode[] = …;
struct sh_keysc_priv { … };
#define KYCR1 …
#define KYCR2 …
#define KYINDR …
#define KYOUTDR …
#define KYCR2_IRQ_LEVEL …
#define KYCR2_IRQ_DISABLED …
static unsigned long sh_keysc_read(struct sh_keysc_priv *p, int reg_nr)
{ … }
static void sh_keysc_write(struct sh_keysc_priv *p, int reg_nr,
unsigned long value)
{ … }
static void sh_keysc_level_mode(struct sh_keysc_priv *p,
unsigned long keys_set)
{ … }
static void sh_keysc_map_dbg(struct device *dev, unsigned long *map,
const char *str)
{ … }
static irqreturn_t sh_keysc_isr(int irq, void *dev_id)
{ … }
static int sh_keysc_probe(struct platform_device *pdev)
{ … }
static void sh_keysc_remove(struct platform_device *pdev)
{ … }
static int sh_keysc_suspend(struct device *dev)
{ … }
static int sh_keysc_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(sh_keysc_dev_pm_ops,
sh_keysc_suspend, sh_keysc_resume);
static struct platform_driver sh_keysc_device_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;