#include <linux/unaligned.h>
#include <linux/bits.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/input.h>
#include <linux/input/sparse-keymap.h>
#include <linux/kernel.h>
#include <linux/module.h>
#define SEESAW_DEVICE_NAME …
#define SEESAW_ADC_BASE …
#define SEESAW_GPIO_DIRCLR_BULK …
#define SEESAW_GPIO_BULK …
#define SEESAW_GPIO_BULK_SET …
#define SEESAW_GPIO_PULLENSET …
#define SEESAW_STATUS_HW_ID …
#define SEESAW_STATUS_SWRST …
#define SEESAW_ADC_OFFSET …
#define SEESAW_BUTTON_A …
#define SEESAW_BUTTON_B …
#define SEESAW_BUTTON_X …
#define SEESAW_BUTTON_Y …
#define SEESAW_BUTTON_START …
#define SEESAW_BUTTON_SELECT …
#define SEESAW_ANALOG_X …
#define SEESAW_ANALOG_Y …
#define SEESAW_JOYSTICK_MAX_AXIS …
#define SEESAW_JOYSTICK_FUZZ …
#define SEESAW_JOYSTICK_FLAT …
#define SEESAW_GAMEPAD_POLL_INTERVAL_MS …
#define SEESAW_GAMEPAD_POLL_MIN …
#define SEESAW_GAMEPAD_POLL_MAX …
static const u32 SEESAW_BUTTON_MASK = …;
struct seesaw_gamepad { … };
struct seesaw_data { … };
static const struct key_entry seesaw_buttons_new[] = …;
static int seesaw_register_read(struct i2c_client *client, u16 reg, void *buf,
int count)
{ … }
static int seesaw_register_write_u8(struct i2c_client *client, u16 reg,
u8 value)
{ … }
static int seesaw_register_write_u32(struct i2c_client *client, u16 reg,
u32 value)
{ … }
static int seesaw_read_data(struct i2c_client *client, struct seesaw_data *data)
{ … }
static int seesaw_open(struct input_dev *input)
{ … }
static void seesaw_poll(struct input_dev *input)
{ … }
static int seesaw_probe(struct i2c_client *client)
{ … }
static const struct i2c_device_id seesaw_id_table[] = …;
MODULE_DEVICE_TABLE(i2c, seesaw_id_table);
static const struct of_device_id seesaw_of_table[] = …;
MODULE_DEVICE_TABLE(of, seesaw_of_table);
static struct i2c_driver seesaw_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;