#include <linux/module.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/mutex.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#define CM3323_DRV_NAME …
#define CM3323_CMD_CONF …
#define CM3323_CMD_RED_DATA …
#define CM3323_CMD_GREEN_DATA …
#define CM3323_CMD_BLUE_DATA …
#define CM3323_CMD_CLEAR_DATA …
#define CM3323_CONF_SD_BIT …
#define CM3323_CONF_AF_BIT …
#define CM3323_CONF_IT_MASK …
#define CM3323_CONF_IT_SHIFT …
#define CM3323_INT_TIME_AVAILABLE …
static const struct { … } cm3323_int_time[] = …;
struct cm3323_data { … };
#define CM3323_COLOR_CHANNEL(_color, _addr) …
static const struct iio_chan_spec cm3323_channels[] = …;
static IIO_CONST_ATTR_INT_TIME_AVAIL(CM3323_INT_TIME_AVAILABLE);
static struct attribute *cm3323_attributes[] = …;
static const struct attribute_group cm3323_attribute_group = …;
static int cm3323_init(struct iio_dev *indio_dev)
{ … }
static void cm3323_disable(void *data)
{ … }
static int cm3323_set_it_bits(struct cm3323_data *data, int val, int val2)
{ … }
static int cm3323_get_it_bits(struct cm3323_data *data)
{ … }
static int cm3323_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan, int *val,
int *val2, long mask)
{ … }
static int cm3323_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan, int val,
int val2, long mask)
{ … }
static const struct iio_info cm3323_info = …;
static int cm3323_probe(struct i2c_client *client)
{ … }
static const struct i2c_device_id cm3323_id[] = …;
MODULE_DEVICE_TABLE(i2c, cm3323_id);
static const struct of_device_id cm3323_of_match[] = …;
MODULE_DEVICE_TABLE(of, cm3323_of_match);
static struct i2c_driver cm3323_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;