linux/drivers/iio/proximity/mb1232.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * mb1232.c - Support for MaxBotix I2CXL-MaxSonar-EZ series ultrasonic
 *   ranger with i2c interface
 * actually tested with mb1232 type
 *
 * Copyright (c) 2019 Andreas Klinger <[email protected]>
 *
 * For details about the device see:
 * https://www.maxbotix.com/documents/I2CXL-MaxSonar-EZ_Datasheet.pdf
 */

#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>

/* registers of MaxSonar device */
#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();