linux/drivers/iio/amplifiers/ada4250.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * ADA4250 driver
 *
 * Copyright 2022 Analog Devices Inc.
 */

#include <linux/bitfield.h>
#include <linux/bits.h>
#include <linux/device.h>
#include <linux/iio/iio.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/spi/spi.h>

#include <linux/unaligned.h>

/* ADA4250 Register Map */
#define ADA4250_REG_GAIN_MUX
#define ADA4250_REG_REFBUF_EN
#define ADA4250_REG_RESET
#define ADA4250_REG_SNSR_CAL_VAL
#define ADA4250_REG_SNSR_CAL_CNFG
#define ADA4250_REG_DIE_REV
#define ADA4250_REG_CHIP_ID

/* ADA4250_REG_GAIN_MUX Map */
#define ADA4250_GAIN_MUX_MSK

/* ADA4250_REG_REFBUF Map */
#define ADA4250_REFBUF_MSK

/* ADA4250_REG_RESET Map */
#define ADA4250_RESET_MSK

/* ADA4250_REG_SNSR_CAL_VAL Map */
#define ADA4250_CAL_CFG_BIAS_MSK

/* ADA4250_REG_SNSR_CAL_CNFG Bit Definition */
#define ADA4250_BIAS_SET_MSK
#define ADA4250_RANGE_SET_MSK

/* Miscellaneous definitions */
#define ADA4250_CHIP_ID
#define ADA4250_RANGE1
#define ADA4250_RANGE4

/* ADA4250 current bias set */
enum ada4250_current_bias {};

struct ada4250_state {};

/* ADA4250 Current Bias Source Settings: Disabled, Bandgap Reference, AVDD */
static const int calibbias_table[] =;

/* ADA4250 Gain (V/V) values: 1, 2, 4, 8, 16, 32, 64, 128 */
static const int hwgain_table[] =;

static const struct regmap_config ada4250_regmap_config =;

static int ada4250_set_offset_uv(struct iio_dev *indio_dev,
				 const struct iio_chan_spec *chan,
				 int offset_uv)
{}

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

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

static int ada4250_read_avail(struct iio_dev *indio_dev,
			      struct iio_chan_spec const *chan,
			      const int **vals, int *type, int *length,
			      long mask)
{}

static int ada4250_reg_access(struct iio_dev *indio_dev,
			      unsigned int reg,
			      unsigned int write_val,
			      unsigned int *read_val)
{}

static const struct iio_info ada4250_info =;

static const struct iio_chan_spec ada4250_channels[] =;

static void ada4250_reg_disable(void *data)
{}

static int ada4250_init(struct ada4250_state *st)
{}

static int ada4250_probe(struct spi_device *spi)
{}

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

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

static struct spi_driver ada4250_driver =;
module_spi_driver();

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