linux/drivers/iio/adc/berlin2-adc.c

/*
 * Marvell Berlin2 ADC driver
 *
 * Copyright (C) 2015 Marvell Technology Group Ltd.
 *
 * Antoine Tenart <[email protected]>
 *
 * This file is licensed under the terms of the GNU General Public
 * License version 2. This program is licensed "as is" without any
 * warranty of any kind, whether express or implied.
 */

#include <linux/iio/iio.h>
#include <linux/iio/driver.h>
#include <linux/iio/machine.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/mfd/syscon.h>
#include <linux/regmap.h>
#include <linux/sched.h>
#include <linux/wait.h>

#define BERLIN2_SM_CTRL
#define BERLIN2_SM_CTRL_SM_SOC_INT
#define BERLIN2_SM_CTRL_SOC_SM_INT
#define BERLIN2_SM_CTRL_ADC_SEL(x)
#define BERLIN2_SM_CTRL_ADC_SEL_MASK
#define BERLIN2_SM_CTRL_ADC_POWER
#define BERLIN2_SM_CTRL_ADC_CLKSEL_DIV2
#define BERLIN2_SM_CTRL_ADC_CLKSEL_DIV3
#define BERLIN2_SM_CTRL_ADC_CLKSEL_DIV4
#define BERLIN2_SM_CTRL_ADC_CLKSEL_DIV8
#define BERLIN2_SM_CTRL_ADC_CLKSEL_MASK
#define BERLIN2_SM_CTRL_ADC_START
#define BERLIN2_SM_CTRL_ADC_RESET
#define BERLIN2_SM_CTRL_ADC_BANDGAP_RDY
#define BERLIN2_SM_CTRL_ADC_CONT_SINGLE
#define BERLIN2_SM_CTRL_ADC_CONT_CONTINUOUS
#define BERLIN2_SM_CTRL_ADC_BUFFER_EN
#define BERLIN2_SM_CTRL_ADC_VREF_EXT
#define BERLIN2_SM_CTRL_ADC_VREF_INT
#define BERLIN2_SM_CTRL_ADC_ROTATE
#define BERLIN2_SM_CTRL_TSEN_EN
#define BERLIN2_SM_CTRL_TSEN_CLK_SEL_125
#define BERLIN2_SM_CTRL_TSEN_CLK_SEL_250
#define BERLIN2_SM_CTRL_TSEN_MODE_0_125
#define BERLIN2_SM_CTRL_TSEN_MODE_10_50
#define BERLIN2_SM_CTRL_TSEN_RESET
#define BERLIN2_SM_ADC_DATA
#define BERLIN2_SM_ADC_MASK
#define BERLIN2_SM_ADC_STATUS
#define BERLIN2_SM_ADC_STATUS_DATA_RDY(x)
#define BERLIN2_SM_ADC_STATUS_DATA_RDY_MASK
#define BERLIN2_SM_ADC_STATUS_INT_EN(x)
#define BERLIN2_SM_ADC_STATUS_INT_EN_MASK
#define BERLIN2_SM_TSEN_STATUS
#define BERLIN2_SM_TSEN_STATUS_DATA_RDY
#define BERLIN2_SM_TSEN_STATUS_INT_EN
#define BERLIN2_SM_TSEN_DATA
#define BERLIN2_SM_TSEN_MASK
#define BERLIN2_SM_TSEN_CTRL
#define BERLIN2_SM_TSEN_CTRL_START
#define BERLIN2_SM_TSEN_CTRL_SETTLING_4
#define BERLIN2_SM_TSEN_CTRL_SETTLING_12
#define BERLIN2_SM_TSEN_CTRL_SETTLING_MASK
#define BERLIN2_SM_TSEN_CTRL_TRIM(x)
#define BERLIN2_SM_TSEN_CTRL_TRIM_MASK

struct berlin2_adc_priv {};

#define BERLIN2_ADC_CHANNEL(n, t)

static const struct iio_chan_spec berlin2_adc_channels[] =;

static int berlin2_adc_read(struct iio_dev *indio_dev, int channel)
{}

static int berlin2_adc_tsen_read(struct iio_dev *indio_dev)
{}

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

static irqreturn_t berlin2_adc_irq(int irq, void *private)
{}

static irqreturn_t berlin2_adc_tsen_irq(int irq, void *private)
{}

static const struct iio_info berlin2_adc_info =;

static void berlin2_adc_powerdown(void *regmap)
{}

static int berlin2_adc_probe(struct platform_device *pdev)
{}

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

static struct platform_driver berlin2_adc_driver =;
module_platform_driver();

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