#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/events.h>
#include <linux/iio/consumer.h>
#include <linux/iio/types.h>
#include <linux/init.h>
#include <linux/leds.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/regulator/consumer.h>
#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
#include <linux/math64.h>
#include <linux/pm.h>
#define CM3605_PROX_CHANNEL …
#define CM3605_ALS_CHANNEL …
#define CM3605_AOUT_TYP_MAX_MV …
#define CM3605_AOUT_MAX_MV …
struct cm3605 { … };
static irqreturn_t cm3605_prox_irq(int irq, void *d)
{ … }
static int cm3605_get_lux(struct cm3605 *cm3605)
{ … }
static int cm3605_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val, int *val2, long mask)
{ … }
static const struct iio_info cm3605_info = …;
static const struct iio_event_spec cm3605_events[] = …;
static const struct iio_chan_spec cm3605_channels[] = …;
static int cm3605_probe(struct platform_device *pdev)
{ … }
static void cm3605_remove(struct platform_device *pdev)
{ … }
static int cm3605_pm_suspend(struct device *dev)
{ … }
static int cm3605_pm_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(cm3605_dev_pm_ops, cm3605_pm_suspend,
cm3605_pm_resume);
static const struct of_device_id cm3605_of_match[] = …;
MODULE_DEVICE_TABLE(of, cm3605_of_match);
static struct platform_driver cm3605_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;