#include <linux/clk.h>
#include <linux/err.h>
#include <linux/iio/iio.h>
#include <linux/iio/driver.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>
#include <linux/regulator/consumer.h>
#define LPC18XX_ADC_CR …
#define LPC18XX_ADC_CR_CLKDIV_SHIFT …
#define LPC18XX_ADC_CR_PDN …
#define LPC18XX_ADC_CR_START_NOW …
#define LPC18XX_ADC_GDR …
#define LPC18XX_ADC_SAMPLE_SHIFT …
#define LPC18XX_ADC_SAMPLE_MASK …
#define LPC18XX_ADC_CONV_DONE …
#define LPC18XX_ADC_CLK_TARGET …
struct lpc18xx_adc { … };
#define LPC18XX_ADC_CHAN(_idx) …
static const struct iio_chan_spec lpc18xx_adc_iio_channels[] = …;
static int lpc18xx_adc_read_chan(struct lpc18xx_adc *adc, unsigned int ch)
{ … }
static int lpc18xx_adc_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val, int *val2, long mask)
{ … }
static const struct iio_info lpc18xx_adc_info = …;
static void lpc18xx_clear_cr_reg(void *data)
{ … }
static void lpc18xx_regulator_disable(void *vref)
{ … }
static int lpc18xx_adc_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id lpc18xx_adc_match[] = …;
MODULE_DEVICE_TABLE(of, lpc18xx_adc_match);
static struct platform_driver lpc18xx_adc_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;