linux/drivers/iio/adc/ti-ads8688.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2015 Prevas A/S
 */

#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/sysfs.h>
#include <linux/spi/spi.h>
#include <linux/regulator/consumer.h>
#include <linux/err.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>

#include <linux/iio/iio.h>
#include <linux/iio/buffer.h>
#include <linux/iio/trigger_consumer.h>
#include <linux/iio/triggered_buffer.h>
#include <linux/iio/sysfs.h>

#define ADS8688_CMD_REG(x)
#define ADS8688_CMD_REG_NOOP
#define ADS8688_CMD_REG_RST
#define ADS8688_CMD_REG_MAN_CH(chan)
#define ADS8688_CMD_DONT_CARE_BITS

#define ADS8688_PROG_REG(x)
#define ADS8688_PROG_REG_RANGE_CH(chan)
#define ADS8688_PROG_WR_BIT
#define ADS8688_PROG_DONT_CARE_BITS

#define ADS8688_REG_PLUSMINUS25VREF
#define ADS8688_REG_PLUSMINUS125VREF
#define ADS8688_REG_PLUSMINUS0625VREF
#define ADS8688_REG_PLUS25VREF
#define ADS8688_REG_PLUS125VREF

#define ADS8688_VREF_MV
#define ADS8688_REALBITS
#define ADS8688_MAX_CHANNELS

/*
 * enum ads8688_range - ADS8688 reference voltage range
 * @ADS8688_PLUSMINUS25VREF: Device is configured for input range ±2.5 * VREF
 * @ADS8688_PLUSMINUS125VREF: Device is configured for input range ±1.25 * VREF
 * @ADS8688_PLUSMINUS0625VREF: Device is configured for input range ±0.625 * VREF
 * @ADS8688_PLUS25VREF: Device is configured for input range 0 - 2.5 * VREF
 * @ADS8688_PLUS125VREF: Device is configured for input range 0 - 1.25 * VREF
 */
enum ads8688_range {};

struct ads8688_chip_info {};

struct ads8688_state {};

enum ads8688_id {};

struct ads8688_ranges {};

static const struct ads8688_ranges ads8688_range_def[5] =;

static ssize_t ads8688_show_scales(struct device *dev,
				   struct device_attribute *attr, char *buf)
{}

static ssize_t ads8688_show_offsets(struct device *dev,
				    struct device_attribute *attr, char *buf)
{}

static IIO_DEVICE_ATTR(in_voltage_scale_available, S_IRUGO,
		       ads8688_show_scales, NULL, 0);
static IIO_DEVICE_ATTR(in_voltage_offset_available, S_IRUGO,
		       ads8688_show_offsets, NULL, 0);

static struct attribute *ads8688_attributes[] =;

static const struct attribute_group ads8688_attribute_group =;

#define ADS8688_CHAN(index)

static const struct iio_chan_spec ads8684_channels[] =;

static const struct iio_chan_spec ads8688_channels[] =;

static int ads8688_prog_write(struct iio_dev *indio_dev, unsigned int addr,
			      unsigned int val)
{}

static int ads8688_reset(struct iio_dev *indio_dev)
{}

static int ads8688_read(struct iio_dev *indio_dev, unsigned int chan)
{}

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

static int ads8688_write_reg_range(struct iio_dev *indio_dev,
				   struct iio_chan_spec const *chan,
				   enum ads8688_range range)
{}

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

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

static const struct iio_info ads8688_info =;

static irqreturn_t ads8688_trigger_handler(int irq, void *p)
{}

static const struct ads8688_chip_info ads8688_chip_info_tbl[] =;

static int ads8688_probe(struct spi_device *spi)
{}

static const struct spi_device_id ads8688_id[] =;
MODULE_DEVICE_TABLE(spi, ads8688_id);

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

static struct spi_driver ads8688_driver =;
module_spi_driver();

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