#include <linux/bitops.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/delay.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/property.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/buffer.h>
#include <linux/iio/trigger_consumer.h>
#include <linux/iio/triggered_buffer.h>
#define MB1232_RANGE_COMMAND …
#define MB1232_ADDR_UNLOCK_1 …
#define MB1232_ADDR_UNLOCK_2 …
struct mb1232_data { … };
static irqreturn_t mb1232_handle_irq(int irq, void *dev_id)
{ … }
static s16 mb1232_read_distance(struct mb1232_data *data)
{ … }
static irqreturn_t mb1232_trigger_handler(int irq, void *p)
{ … }
static int mb1232_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *channel, int *val,
int *val2, long mask)
{ … }
static const struct iio_chan_spec mb1232_channels[] = …;
static const struct iio_info mb1232_info = …;
static int mb1232_probe(struct i2c_client *client)
{ … }
static const struct of_device_id of_mb1232_match[] = …;
MODULE_DEVICE_TABLE(of, of_mb1232_match);
static const struct i2c_device_id mb1232_id[] = …;
MODULE_DEVICE_TABLE(i2c, mb1232_id);
static struct i2c_driver mb1232_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;