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

// SPDX-License-Identifier: GPL-2.0-only
/*
 * TI ADC081C/ADC101C/ADC121C 8/10/12-bit ADC driver
 *
 * Copyright (C) 2012 Avionic Design GmbH
 * Copyright (C) 2016 Intel
 *
 * Datasheets:
 *	https://www.ti.com/lit/ds/symlink/adc081c021.pdf
 *	https://www.ti.com/lit/ds/symlink/adc101c021.pdf
 *	https://www.ti.com/lit/ds/symlink/adc121c021.pdf
 *
 * The devices have a very similar interface and differ mostly in the number of
 * bits handled. For the 8-bit and 10-bit models the least-significant 4 or 2
 * bits of value registers are reserved.
 */

#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/property.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/regulator/consumer.h>

struct adc081c {};

#define REG_CONV_RES

static int adc081c_read_raw(struct iio_dev *iio,
			    struct iio_chan_spec const *channel, int *value,
			    int *shift, long mask)
{}

#define ADCxx1C_CHAN(_bits)

#define DEFINE_ADCxx1C_CHANNELS(_name, _bits)								\

#define ADC081C_NUM_CHANNELS

struct adcxx1c_model {};

#define ADCxx1C_MODEL(_name, _bits)

DEFINE_ADCxx1C_CHANNELS(adc081c,  8);
DEFINE_ADCxx1C_CHANNELS(adc101c, 10);
DEFINE_ADCxx1C_CHANNELS(adc121c, 12);

/* Model ids are indexes in _models array */
enum adcxx1c_model_id {};

static struct adcxx1c_model adcxx1c_models[] =;

static const struct iio_info adc081c_info =;

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

static void adc081c_reg_disable(void *reg)
{}

static int adc081c_probe(struct i2c_client *client)
{}

static const struct i2c_device_id adc081c_id[] =;
MODULE_DEVICE_TABLE(i2c, adc081c_id);

static const struct acpi_device_id adc081c_acpi_match[] =;
MODULE_DEVICE_TABLE(acpi, adc081c_acpi_match);

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

static struct i2c_driver adc081c_driver =;
module_i2c_driver();

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