linux/drivers/iio/proximity/pulsedlight-lidar-lite-v2.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * pulsedlight-lidar-lite-v2.c - Support for PulsedLight LIDAR sensor
 *
 * Copyright (C) 2015, 2017-2018
 * Author: Matt Ranostay <[email protected]>
 *
 * TODO: interrupt mode, and signal strength reporting
 */

#include <linux/err.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/pm_runtime.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/buffer.h>
#include <linux/iio/trigger.h>
#include <linux/iio/triggered_buffer.h>
#include <linux/iio/trigger_consumer.h>

#define LIDAR_REG_CONTROL
#define LIDAR_REG_CONTROL_ACQUIRE

#define LIDAR_REG_STATUS
#define LIDAR_REG_STATUS_INVALID
#define LIDAR_REG_STATUS_READY

#define LIDAR_REG_DATA_HBYTE
#define LIDAR_REG_DATA_LBYTE
#define LIDAR_REG_DATA_WORD_READ

#define LIDAR_REG_PWR_CONTROL

#define LIDAR_DRV_NAME

struct lidar_data {};

static const struct iio_chan_spec lidar_channels[] =;

static int lidar_i2c_xfer(struct lidar_data *data, u8 reg, u8 *val, int len)
{}

static int lidar_smbus_xfer(struct lidar_data *data, u8 reg, u8 *val, int len)
{}

static int lidar_read_byte(struct lidar_data *data, u8 reg)
{}

static inline int lidar_write_control(struct lidar_data *data, int val)
{}

static inline int lidar_write_power(struct lidar_data *data, int val)
{}

static int lidar_read_measurement(struct lidar_data *data, u16 *reg)
{}

static int lidar_get_measurement(struct lidar_data *data, u16 *reg)
{}

static int lidar_read_raw(struct iio_dev *indio_dev,
			  struct iio_chan_spec const *chan,
			  int *val, int *val2, long mask)
{}

static irqreturn_t lidar_trigger_handler(int irq, void *private)
{}

static const struct iio_info lidar_info =;

static int lidar_probe(struct i2c_client *client)
{}

static void lidar_remove(struct i2c_client *client)
{}

static const struct i2c_device_id lidar_id[] =;
MODULE_DEVICE_TABLE(i2c, lidar_id);

static const struct of_device_id lidar_dt_ids[] =;
MODULE_DEVICE_TABLE(of, lidar_dt_ids);

static int lidar_pm_runtime_suspend(struct device *dev)
{}

static int lidar_pm_runtime_resume(struct device *dev)
{}

static const struct dev_pm_ops lidar_pm_ops =;

static struct i2c_driver lidar_driver =;
module_i2c_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();