#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/regmap.h>
#include <linux/iio/iio.h>
struct tpl0102_cfg { … };
enum tpl0102_type { … };
static const struct tpl0102_cfg tpl0102_cfg[] = …;
struct tpl0102_data { … };
static const struct regmap_config tpl0102_regmap_config = …;
#define TPL0102_CHANNEL(ch) …
static const struct iio_chan_spec tpl0102_channels[] = …;
static int tpl0102_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val, int *val2, long mask)
{ … }
static int tpl0102_read_avail(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
const int **vals, int *type, int *length,
long mask)
{ … }
static int tpl0102_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int val, int val2, long mask)
{ … }
static const struct iio_info tpl0102_info = …;
static int tpl0102_probe(struct i2c_client *client)
{ … }
static const struct i2c_device_id tpl0102_id[] = …;
MODULE_DEVICE_TABLE(i2c, tpl0102_id);
static struct i2c_driver tpl0102_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;