#include <linux/device.h>
#include <linux/gfp.h>
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/spi/spi.h>
#define RESP_COUNTER(response) …
#define RESP_SIZE(response) …
#define RESP_TYPE(response) …
struct ec_input_response { … } __packed;
struct ariel_pwrbutton { … };
static int ec_input_read(struct ariel_pwrbutton *priv,
struct ec_input_response *response)
{ … }
static irqreturn_t ec_input_interrupt(int irq, void *dev_id)
{ … }
static int ariel_pwrbutton_probe(struct spi_device *spi)
{ … }
static const struct of_device_id ariel_pwrbutton_of_match[] = …;
MODULE_DEVICE_TABLE(of, ariel_pwrbutton_of_match);
static const struct spi_device_id ariel_pwrbutton_spi_ids[] = …;
MODULE_DEVICE_TABLE(spi, ariel_pwrbutton_spi_ids);
static struct spi_driver ariel_pwrbutton_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;