#include <linux/bitfield.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#define AL3010_DRV_NAME …
#define AL3010_REG_SYSTEM …
#define AL3010_REG_DATA_LOW …
#define AL3010_REG_CONFIG …
#define AL3010_CONFIG_DISABLE …
#define AL3010_CONFIG_ENABLE …
#define AL3010_GAIN_MASK …
#define AL3010_SCALE_AVAILABLE …
enum al3xxxx_range { … };
static const int al3010_scales[][2] = …;
struct al3010_data { … };
static const struct iio_chan_spec al3010_channels[] = …;
static IIO_CONST_ATTR(in_illuminance_scale_available, AL3010_SCALE_AVAILABLE);
static struct attribute *al3010_attributes[] = …;
static const struct attribute_group al3010_attribute_group = …;
static int al3010_set_pwr(struct i2c_client *client, bool pwr)
{ … }
static void al3010_set_pwr_off(void *_data)
{ … }
static int al3010_init(struct al3010_data *data)
{ … }
static int al3010_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan, int *val,
int *val2, long mask)
{ … }
static int al3010_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan, int val,
int val2, long mask)
{ … }
static const struct iio_info al3010_info = …;
static int al3010_probe(struct i2c_client *client)
{ … }
static int al3010_suspend(struct device *dev)
{ … }
static int al3010_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(al3010_pm_ops, al3010_suspend, al3010_resume);
static const struct i2c_device_id al3010_id[] = …;
MODULE_DEVICE_TABLE(i2c, al3010_id);
static const struct of_device_id al3010_of_match[] = …;
MODULE_DEVICE_TABLE(of, al3010_of_match);
static struct i2c_driver al3010_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;