#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/input/kxtj9.h>
#define NAME …
#define G_MAX …
#define XOUT_L …
#define WHO_AM_I …
#define INT_REL …
#define CTRL_REG1 …
#define INT_CTRL1 …
#define DATA_CTRL …
#define PC1_OFF …
#define PC1_ON …
#define DRDYE …
#define ODR12_5F …
#define ODR25F …
#define ODR50F …
#define ODR100F …
#define ODR200F …
#define ODR400F …
#define ODR800F …
#define KXTJ9_IEL …
#define KXTJ9_IEA …
#define KXTJ9_IEN …
#define FUZZ …
#define FLAT …
#define RES_DATA_CTRL …
#define RES_CTRL_REG1 …
#define RES_INT_CTRL1 …
#define RESUME_ENTRIES …
static const struct { … } kxtj9_odr_table[] = …;
struct kxtj9_data { … };
static int kxtj9_i2c_read(struct kxtj9_data *tj9, u8 addr, u8 *data, int len)
{ … }
static void kxtj9_report_acceleration_data(struct kxtj9_data *tj9)
{ … }
static irqreturn_t kxtj9_isr(int irq, void *dev)
{ … }
static int kxtj9_update_g_range(struct kxtj9_data *tj9, u8 new_g_range)
{ … }
static int kxtj9_update_odr(struct kxtj9_data *tj9, unsigned int poll_interval)
{ … }
static int kxtj9_device_power_on(struct kxtj9_data *tj9)
{ … }
static void kxtj9_device_power_off(struct kxtj9_data *tj9)
{ … }
static int kxtj9_enable(struct kxtj9_data *tj9)
{ … }
static void kxtj9_disable(struct kxtj9_data *tj9)
{ … }
static int kxtj9_input_open(struct input_dev *input)
{ … }
static void kxtj9_input_close(struct input_dev *dev)
{ … }
static ssize_t kxtj9_get_poll(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t kxtj9_set_poll(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR(poll, S_IRUGO|S_IWUSR, kxtj9_get_poll, kxtj9_set_poll);
static struct attribute *kxtj9_attrs[] = …;
static umode_t kxtj9_attr_is_visible(struct kobject *kobj,
struct attribute *attr, int n)
{ … }
static struct attribute_group kxtj9_group = …;
__ATTRIBUTE_GROUPS(…);
static void kxtj9_poll(struct input_dev *input)
{ … }
static void kxtj9_platform_exit(void *data)
{ … }
static int kxtj9_verify(struct kxtj9_data *tj9)
{ … }
static int kxtj9_probe(struct i2c_client *client)
{ … }
static int kxtj9_suspend(struct device *dev)
{ … }
static int kxtj9_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(kxtj9_pm_ops, kxtj9_suspend, kxtj9_resume);
static const struct i2c_device_id kxtj9_id[] = …;
MODULE_DEVICE_TABLE(i2c, kxtj9_id);
static struct i2c_driver kxtj9_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;