#include <linux/completion.h>
#include <linux/err.h>
#include <linux/iio/iio.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/mfd/stmpe.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/device.h>
#define STMPE_REG_INT_STA …
#define STMPE_REG_ADC_INT_EN …
#define STMPE_REG_ADC_INT_STA …
#define STMPE_REG_ADC_CTRL1 …
#define STMPE_REG_ADC_CTRL2 …
#define STMPE_REG_ADC_CAPT …
#define STMPE_REG_ADC_DATA_CH(channel) …
#define STMPE_REG_TEMP_CTRL …
#define STMPE_TEMP_CTRL_ENABLE …
#define STMPE_TEMP_CTRL_ACQ …
#define STMPE_TEMP_CTRL_THRES_EN …
#define STMPE_START_ONE_TEMP_CONV …
#define STMPE_REG_TEMP_DATA …
#define STMPE_REG_TEMP_TH …
#define STMPE_ADC_LAST_NR …
#define STMPE_TEMP_CHANNEL …
#define STMPE_ADC_CH(channel) …
#define STMPE_ADC_TIMEOUT …
struct stmpe_adc { … };
static int stmpe_read_voltage(struct stmpe_adc *info,
struct iio_chan_spec const *chan, int *val)
{ … }
static int stmpe_read_temp(struct stmpe_adc *info,
struct iio_chan_spec const *chan, int *val)
{ … }
static int stmpe_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val,
int *val2,
long mask)
{ … }
static irqreturn_t stmpe_adc_isr(int irq, void *dev_id)
{ … }
static const struct iio_info stmpe_adc_iio_info = …;
static void stmpe_adc_voltage_chan(struct iio_chan_spec *ics, int chan)
{ … }
static void stmpe_adc_temp_chan(struct iio_chan_spec *ics, int chan)
{ … }
static int stmpe_adc_init_hw(struct stmpe_adc *adc)
{ … }
static int stmpe_adc_probe(struct platform_device *pdev)
{ … }
static int stmpe_adc_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(stmpe_adc_pm_ops, NULL, stmpe_adc_resume);
static const struct of_device_id stmpe_adc_ids[] = …;
MODULE_DEVICE_TABLE(of, stmpe_adc_ids);
static struct platform_driver stmpe_adc_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;