#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/input.h>
#include <linux/ioport.h>
#include <linux/platform_device.h>
#include <linux/gpio.h>
#include <linux/gpio/consumer.h>
#include <linux/gpio_keys.h>
#include <linux/property.h>
#define DRV_NAME …
struct gpio_keys_button_data { … };
struct gpio_keys_polled_dev { … };
static void gpio_keys_button_event(struct input_dev *input,
const struct gpio_keys_button *button,
int state)
{ … }
static void gpio_keys_polled_check_state(struct input_dev *input,
const struct gpio_keys_button *button,
struct gpio_keys_button_data *bdata)
{ … }
static void gpio_keys_polled_poll(struct input_dev *input)
{ … }
static int gpio_keys_polled_open(struct input_dev *input)
{ … }
static void gpio_keys_polled_close(struct input_dev *input)
{ … }
static struct gpio_keys_platform_data *
gpio_keys_polled_get_devtree_pdata(struct device *dev)
{ … }
static void gpio_keys_polled_set_abs_params(struct input_dev *input,
const struct gpio_keys_platform_data *pdata, unsigned int code)
{ … }
static const struct of_device_id gpio_keys_polled_of_match[] = …;
MODULE_DEVICE_TABLE(of, gpio_keys_polled_of_match);
static int gpio_keys_polled_probe(struct platform_device *pdev)
{ … }
static struct platform_driver gpio_keys_polled_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_ALIAS(…) …;