linux/drivers/iio/adc/ad7887.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * AD7887 SPI ADC driver
 *
 * Copyright 2010-2011 Analog Devices Inc.
 */

#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/interrupt.h>
#include <linux/bitops.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>

#include <linux/platform_data/ad7887.h>

#define AD7887_REF_DIS
#define AD7887_DUAL
#define AD7887_CH_AIN1
#define AD7887_CH_AIN0
#define AD7887_PM_MODE1
#define AD7887_PM_MODE2
#define AD7887_PM_MODE3
#define AD7887_PM_MODE4

enum ad7887_channels {};

/**
 * struct ad7887_chip_info - chip specifc information
 * @int_vref_mv:	the internal reference voltage
 * @channels:		channels specification
 * @num_channels:	number of channels
 * @dual_channels:	channels specification in dual mode
 * @num_dual_channels:	number of channels in dual mode
 */
struct ad7887_chip_info {};

struct ad7887_state {};

enum ad7887_supported_device_ids {};

static int ad7887_ring_preenable(struct iio_dev *indio_dev)
{}

static int ad7887_ring_postdisable(struct iio_dev *indio_dev)
{}

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

static const struct iio_buffer_setup_ops ad7887_ring_setup_ops =;

static int ad7887_scan_direct(struct ad7887_state *st, unsigned ch)
{}

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

#define AD7887_CHANNEL(x)

static const struct iio_chan_spec ad7887_channels[] =;

static const struct iio_chan_spec ad7887_dual_channels[] =;

static const struct ad7887_chip_info ad7887_chip_info_tbl[] =;

static const struct iio_info ad7887_info =;

static void ad7887_reg_disable(void *data)
{}

static int ad7887_probe(struct spi_device *spi)
{}

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

static struct spi_driver ad7887_driver =;
module_spi_driver();

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