#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/pm_runtime.h>
#include <linux/delay.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/of_device.h>
#include "lis3lv02d.h"
#define DRV_NAME …
static const char reg_vdd[] = …;
static const char reg_vdd_io[] = …;
static int lis3_reg_ctrl(struct lis3lv02d *lis3, bool state)
{ … }
static inline s32 lis3_i2c_write(struct lis3lv02d *lis3, int reg, u8 value)
{ … }
static inline s32 lis3_i2c_read(struct lis3lv02d *lis3, int reg, u8 *v)
{ … }
static inline s32 lis3_i2c_blockread(struct lis3lv02d *lis3, int reg, int len,
u8 *v)
{ … }
static int lis3_i2c_init(struct lis3lv02d *lis3)
{ … }
static union axis_conversion lis3lv02d_axis_map = …;
#ifdef CONFIG_OF
static const struct of_device_id lis3lv02d_i2c_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, lis3lv02d_i2c_dt_ids);
#endif
static int lis3lv02d_i2c_probe(struct i2c_client *client)
{ … }
static void lis3lv02d_i2c_remove(struct i2c_client *client)
{ … }
#ifdef CONFIG_PM_SLEEP
static int lis3lv02d_i2c_suspend(struct device *dev)
{ … }
static int lis3lv02d_i2c_resume(struct device *dev)
{ … }
#endif
#ifdef CONFIG_PM
static int lis3_i2c_runtime_suspend(struct device *dev)
{ … }
static int lis3_i2c_runtime_resume(struct device *dev)
{ … }
#endif
static const struct i2c_device_id lis3lv02d_id[] = …;
MODULE_DEVICE_TABLE(i2c, lis3lv02d_id);
static const struct dev_pm_ops lis3_pm_ops = …;
static struct i2c_driver lis3lv02d_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;