#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/iopoll.h>
#include <linux/io.h>
#include <linux/iio/iio.h>
#define MT6577_AUXADC_CON0 …
#define MT6577_AUXADC_CON1 …
#define MT6577_AUXADC_CON2 …
#define MT6577_AUXADC_STA …
#define MT6577_AUXADC_DAT0 …
#define MT6577_AUXADC_RDY0 …
#define MT6577_AUXADC_MISC …
#define MT6577_AUXADC_PDN_EN …
#define MT6577_AUXADC_DAT_MASK …
#define MT6577_AUXADC_SLEEP_US …
#define MT6577_AUXADC_TIMEOUT_US …
#define MT6577_AUXADC_POWER_READY_MS …
#define MT6577_AUXADC_SAMPLE_READY_US …
struct mtk_auxadc_compatible { … };
struct mt6577_auxadc_device { … };
static const struct mtk_auxadc_compatible mt8186_compat = …;
static const struct mtk_auxadc_compatible mt8173_compat = …;
static const struct mtk_auxadc_compatible mt6765_compat = …;
#define MT6577_AUXADC_CHANNEL(idx) …
static const struct iio_chan_spec mt6577_auxadc_iio_channels[] = …;
#define VOLTAGE_FULL_RANGE …
#define AUXADC_PRECISE …
static int mt_auxadc_get_cali_data(int rawdata, bool enable_cali)
{ … }
static inline void mt6577_auxadc_mod_reg(void __iomem *reg,
u32 or_mask, u32 and_mask)
{ … }
static int mt6577_auxadc_read(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan)
{ … }
static int mt6577_auxadc_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val,
int *val2,
long info)
{ … }
static const struct iio_info mt6577_auxadc_info = …;
static int mt6577_auxadc_resume(struct device *dev)
{ … }
static int mt6577_auxadc_suspend(struct device *dev)
{ … }
static void mt6577_power_off(void *data)
{ … }
static int mt6577_auxadc_probe(struct platform_device *pdev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(mt6577_auxadc_pm_ops,
mt6577_auxadc_suspend,
mt6577_auxadc_resume);
static const struct of_device_id mt6577_auxadc_of_match[] = …;
MODULE_DEVICE_TABLE(of, mt6577_auxadc_of_match);
static struct platform_driver mt6577_auxadc_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;