#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
#include <linux/errno.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/input.h>
#include <linux/input/matrix_keypad.h>
#include <linux/slab.h>
#include <linux/pm_runtime.h>
#include <linux/pm_wakeirq.h>
#define OMAP4_KBD_REVISION …
#define OMAP4_KBD_SYSCONFIG …
#define OMAP4_KBD_SYSSTATUS …
#define OMAP4_KBD_IRQSTATUS …
#define OMAP4_KBD_IRQENABLE …
#define OMAP4_KBD_WAKEUPENABLE …
#define OMAP4_KBD_PENDING …
#define OMAP4_KBD_CTRL …
#define OMAP4_KBD_DEBOUNCINGTIME …
#define OMAP4_KBD_LONGKEYTIME …
#define OMAP4_KBD_TIMEOUT …
#define OMAP4_KBD_STATEMACHINE …
#define OMAP4_KBD_ROWINPUTS …
#define OMAP4_KBD_COLUMNOUTPUTS …
#define OMAP4_KBD_FULLCODE31_0 …
#define OMAP4_KBD_FULLCODE63_32 …
#define OMAP4_DEF_IRQENABLE_EVENTEN …
#define OMAP4_DEF_IRQENABLE_LONGKEY …
#define OMAP4_DEF_WUP_EVENT_ENA …
#define OMAP4_DEF_WUP_LONG_KEY_ENA …
#define OMAP4_DEF_CTRL_NOSOFTMODE …
#define OMAP4_DEF_CTRL_PTV_SHIFT …
#define OMAP4_VAL_IRQDISABLE …
#define OMAP4_KEYPAD_PTV_DIV_128 …
#define OMAP4_KEYPAD_DEBOUNCINGTIME_MS(dbms, ptv) …
#define OMAP4_VAL_DEBOUNCINGTIME_16MS …
#define OMAP4_KEYPAD_AUTOIDLE_MS …
#define OMAP4_KEYPAD_IDLE_CHECK_MS …
enum { … };
struct omap4_keypad { … };
static int kbd_readl(struct omap4_keypad *keypad_data, u32 offset)
{ … }
static void kbd_writel(struct omap4_keypad *keypad_data, u32 offset, u32 value)
{ … }
static int kbd_read_irqreg(struct omap4_keypad *keypad_data, u32 offset)
{ … }
static void kbd_write_irqreg(struct omap4_keypad *keypad_data,
u32 offset, u32 value)
{ … }
static int omap4_keypad_report_keys(struct omap4_keypad *keypad_data,
u64 keys, bool down)
{ … }
static void omap4_keypad_scan_keys(struct omap4_keypad *keypad_data, u64 keys)
{ … }
static irqreturn_t omap4_keypad_irq_handler(int irq, void *dev_id)
{ … }
static irqreturn_t omap4_keypad_irq_thread_fn(int irq, void *dev_id)
{ … }
static int omap4_keypad_open(struct input_dev *input)
{ … }
static void omap4_keypad_stop(struct omap4_keypad *keypad_data)
{ … }
static void omap4_keypad_close(struct input_dev *input)
{ … }
static int omap4_keypad_parse_dt(struct device *dev,
struct omap4_keypad *keypad_data)
{ … }
static int omap4_keypad_check_revision(struct device *dev,
struct omap4_keypad *keypad_data)
{ … }
static int omap4_keypad_runtime_suspend(struct device *dev)
{ … }
static const struct dev_pm_ops omap4_keypad_pm_ops = …;
static void omap4_disable_pm(void *d)
{ … }
static int omap4_keypad_probe(struct platform_device *pdev)
{ … }
static void omap4_keypad_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id omap_keypad_dt_match[] = …;
MODULE_DEVICE_TABLE(of, omap_keypad_dt_match);
static struct platform_driver omap4_keypad_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;