#include <linux/module.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/err.h>
#include <linux/iio/iio.h>
#include <linux/iio/driver.h>
#include <linux/regulator/consumer.h>
#define M62332_CHANNELS …
struct m62332_data { … };
static int m62332_set_value(struct iio_dev *indio_dev, u8 val, int channel)
{ … }
static int m62332_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val,
int *val2,
long mask)
{ … }
static int m62332_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan, int val, int val2,
long mask)
{ … }
static int m62332_suspend(struct device *dev)
{ … }
static int m62332_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(m62332_pm_ops, m62332_suspend, m62332_resume);
static const struct iio_info m62332_info = …;
#define M62332_CHANNEL(chan) …
static const struct iio_chan_spec m62332_channels[M62332_CHANNELS] = …;
static int m62332_probe(struct i2c_client *client)
{ … }
static void m62332_remove(struct i2c_client *client)
{ … }
static const struct i2c_device_id m62332_id[] = …;
MODULE_DEVICE_TABLE(i2c, m62332_id);
static struct i2c_driver m62332_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;