linux/drivers/iio/adc/ad7780.c

// SPDX-License-Identifier: GPL-2.0
/*
 * AD7170/AD7171 and AD7780/AD7781 SPI ADC driver
 *
 * Copyright 2011 Analog Devices Inc.
 * Copyright 2019 Renato Lui Geh
 */

#include <linux/interrupt.h>
#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/sched.h>
#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/bits.h>

#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/adc/ad_sigma_delta.h>

#define AD7780_RDY
#define AD7780_FILTER
#define AD7780_ERR
#define AD7780_ID1
#define AD7780_ID0
#define AD7780_GAIN

#define AD7170_ID
#define AD7171_ID
#define AD7780_ID
#define AD7781_ID

#define AD7780_ID_MASK

#define AD7780_PATTERN_GOOD
#define AD7780_PATTERN_MASK

#define AD7170_PATTERN_GOOD
#define AD7170_PATTERN_MASK

#define AD7780_GAIN_MIDPOINT
#define AD7780_FILTER_MIDPOINT

static const unsigned int ad778x_gain[2]      =;
static const unsigned int ad778x_odr_avail[2] =;

struct ad7780_chip_info {};

struct ad7780_state {};

enum ad7780_supported_device_ids {};

static struct ad7780_state *ad_sigma_delta_to_ad7780(struct ad_sigma_delta *sd)
{}

static int ad7780_set_mode(struct ad_sigma_delta *sigma_delta,
			   enum ad_sigma_delta_mode mode)
{}

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

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

static int ad7780_postprocess_sample(struct ad_sigma_delta *sigma_delta,
				     unsigned int raw_sample)
{}

static const struct ad_sigma_delta_info ad7780_sigma_delta_info =;

#define _AD7780_CHANNEL(_bits, _wordsize, _mask_all)

#define AD7780_CHANNEL(_bits, _wordsize)
#define AD7170_CHANNEL(_bits, _wordsize)

static const struct ad7780_chip_info ad7780_chip_info_tbl[] =;

static const struct iio_info ad7780_info =;

static int ad7780_init_gpios(struct device *dev, struct ad7780_state *st)
{}

static void ad7780_reg_disable(void *reg)
{}

static int ad7780_probe(struct spi_device *spi)
{}

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

static struct spi_driver ad7780_driver =;
module_spi_driver();

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