#include <linux/bits.h>
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#define RT5120_REG_INTSTAT …
#define RT5120_PWRKEYSTAT_MASK …
struct rt5120_priv { … };
static irqreturn_t rt5120_pwrkey_handler(int irq, void *devid)
{ … }
static int rt5120_pwrkey_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id r5120_pwrkey_match_table[] = …;
MODULE_DEVICE_TABLE(of, r5120_pwrkey_match_table);
static struct platform_driver rt5120_pwrkey_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;