linux/drivers/iio/adc/lpc32xx_adc.c

// SPDX-License-Identifier: GPL-2.0+
/*
 *  lpc32xx_adc.c - Support for ADC in LPC32XX
 *
 *  3-channel, 10-bit ADC
 *
 *  Copyright (C) 2011, 2012 Roland Stigge <[email protected]>
 */

#include <linux/clk.h>
#include <linux/completion.h>
#include <linux/err.h>
#include <linux/iio/iio.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>
#include <linux/regulator/consumer.h>

/*
 * LPC32XX registers definitions
 */
#define LPC32XXAD_SELECT(x)
#define LPC32XXAD_CTRL(x)
#define LPC32XXAD_VALUE(x)

/* Bit definitions for LPC32XXAD_SELECT: */
/* constant, always write this value! */
#define LPC32XXAD_REFm
/* constant, always write this value! */
#define LPC32XXAD_REFp
 /* multiple of this is the channel number: 0, 1, 2 */
#define LPC32XXAD_IN
/* constant, always write this value! */
#define LPC32XXAD_INTERNAL

/* Bit definitions for LPC32XXAD_CTRL: */
#define LPC32XXAD_STROBE
#define LPC32XXAD_PDN_CTRL

/* Bit definitions for LPC32XXAD_VALUE: */
#define LPC32XXAD_VALUE_MASK

#define LPC32XXAD_NAME

struct lpc32xx_adc_state {};

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

static const struct iio_info lpc32xx_adc_iio_info =;

#define LPC32XX_ADC_CHANNEL_BASE(_index)

#define LPC32XX_ADC_CHANNEL(_index)

#define LPC32XX_ADC_SCALE_CHANNEL(_index)

static const struct iio_chan_spec lpc32xx_adc_iio_channels[] =;

static const struct iio_chan_spec lpc32xx_adc_iio_scale_channels[] =;

static irqreturn_t lpc32xx_adc_isr(int irq, void *dev_id)
{}

static int lpc32xx_adc_probe(struct platform_device *pdev)
{}

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

static struct platform_driver lpc32xx_adc_driver =;

module_platform_driver();

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