linux/drivers/iio/adc/ad7266.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * AD7266/65 SPI ADC driver
 *
 * Copyright 2012 Analog Devices Inc.
 */

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

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

#define AD7266_INTERNAL_REF_MV

struct ad7266_state {};

static int ad7266_wakeup(struct ad7266_state *st)
{}

static int ad7266_powerdown(struct ad7266_state *st)
{}

static int ad7266_preenable(struct iio_dev *indio_dev)
{}

static int ad7266_postdisable(struct iio_dev *indio_dev)
{}

static const struct iio_buffer_setup_ops iio_triggered_buffer_setup_ops =;

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

static void ad7266_select_input(struct ad7266_state *st, unsigned int nr)
{}

static int ad7266_update_scan_mode(struct iio_dev *indio_dev,
	const unsigned long *scan_mask)
{}

static int ad7266_read_single(struct ad7266_state *st, int *val,
	unsigned int address)
{}

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

#define AD7266_CHAN(_chan, _sign)

#define AD7266_DECLARE_SINGLE_ENDED_CHANNELS(_name, _sign)

#define AD7266_DECLARE_SINGLE_ENDED_CHANNELS_FIXED(_name, _sign)

static AD7266_DECLARE_SINGLE_ENDED_CHANNELS(u, 'u');
static AD7266_DECLARE_SINGLE_ENDED_CHANNELS(s, 's');
static AD7266_DECLARE_SINGLE_ENDED_CHANNELS_FIXED(u, 'u');
static AD7266_DECLARE_SINGLE_ENDED_CHANNELS_FIXED(s, 's');

#define AD7266_CHAN_DIFF(_chan, _sign)

#define AD7266_DECLARE_DIFF_CHANNELS(_name, _sign)

static AD7266_DECLARE_DIFF_CHANNELS(s, 's');
static AD7266_DECLARE_DIFF_CHANNELS(u, 'u');

#define AD7266_DECLARE_DIFF_CHANNELS_FIXED(_name, _sign)

static AD7266_DECLARE_DIFF_CHANNELS_FIXED(s, 's');
static AD7266_DECLARE_DIFF_CHANNELS_FIXED(u, 'u');

static const struct iio_info ad7266_info =;

static const unsigned long ad7266_available_scan_masks[] =;

static const unsigned long ad7266_available_scan_masks_diff[] =;

static const unsigned long ad7266_available_scan_masks_fixed[] =;

struct ad7266_chan_info {};

#define AD7266_CHAN_INFO_INDEX(_differential, _signed, _fixed)

static const struct ad7266_chan_info ad7266_chan_infos[] =;

static void ad7266_init_channels(struct iio_dev *indio_dev)
{}

static const char * const ad7266_gpio_labels[] =;

static int ad7266_probe(struct spi_device *spi)
{}

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

static struct spi_driver ad7266_driver =;
module_spi_driver();

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