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

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2017 Axis Communications AB
 *
 * Driver for Texas Instruments' ADC084S021 ADC chip.
 * Datasheets can be found here:
 * https://www.ti.com/lit/ds/symlink/adc084s021.pdf
 */

#include <linux/err.h>
#include <linux/spi/spi.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/interrupt.h>
#include <linux/iio/iio.h>
#include <linux/iio/buffer.h>
#include <linux/iio/triggered_buffer.h>
#include <linux/iio/trigger_consumer.h>
#include <linux/regulator/consumer.h>

#define ADC084S021_DRIVER_NAME

struct adc084s021 {};

#define ADC084S021_VOLTAGE_CHANNEL(num)

static const struct iio_chan_spec adc084s021_channels[] =;

/**
 * adc084s021_adc_conversion() - Read an ADC channel and return its value.
 *
 * @adc: The ADC SPI data.
 * @data: Buffer for converted data.
 */
static int adc084s021_adc_conversion(struct adc084s021 *adc, __be16 *data)
{}

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

/**
 * adc084s021_buffer_trigger_handler() - Read ADC channels and push to buffer.
 *
 * @irq: The interrupt number (not used).
 * @pollfunc: Pointer to the poll func.
 */
static irqreturn_t adc084s021_buffer_trigger_handler(int irq, void *pollfunc)
{}

static int adc084s021_buffer_preenable(struct iio_dev *indio_dev)
{}

static int adc084s021_buffer_postdisable(struct iio_dev *indio_dev)
{}

static const struct iio_info adc084s021_info =;

static const struct iio_buffer_setup_ops adc084s021_buffer_setup_ops =;

static int adc084s021_probe(struct spi_device *spi)
{}

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

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

static struct spi_driver adc084s021_driver =;
module_spi_driver();

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