#include <linux/clk.h>
#include <linux/device.h>
#include <linux/mfd/syscon.h>
#include <linux/io.h>
#include <linux/iio/iio.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/spinlock.h>
#include <linux/uaccess.h>
#include <linux/reset.h>
struct npcm_adc_info { … };
struct npcm_adc { … };
#define NPCM_ADCCON …
#define NPCM_ADCDATA …
#define NPCM_ADCCON_ADC_INT_EN …
#define NPCM_ADCCON_REFSEL …
#define NPCM_ADCCON_ADC_INT_ST …
#define NPCM_ADCCON_ADC_EN …
#define NPCM_ADCCON_ADC_RST …
#define NPCM_ADCCON_ADC_CONV …
#define NPCM_ADCCON_CH_MASK …
#define NPCM_ADCCON_CH(x) …
#define NPCM_ADCCON_DIV_SHIFT …
#define NPCM_ADCCON_DIV_MASK …
#define NPCM_ADC_ENABLE …
static const struct npcm_adc_info npxm7xx_adc_info = …;
static const struct npcm_adc_info npxm8xx_adc_info = …;
#define NPCM_ADC_CHAN(ch) …
static const struct iio_chan_spec npcm_adc_iio_channels[] = …;
static irqreturn_t npcm_adc_isr(int irq, void *data)
{ … }
static int npcm_adc_read(struct npcm_adc *info, int *val, u8 channel)
{ … }
static int npcm_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 npcm_adc_iio_info = …;
static const struct of_device_id npcm_adc_match[] = …;
MODULE_DEVICE_TABLE(of, npcm_adc_match);
static int npcm_adc_probe(struct platform_device *pdev)
{ … }
static void npcm_adc_remove(struct platform_device *pdev)
{ … }
static struct platform_driver npcm_adc_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;