#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 AL3320A_DRV_NAME …
#define AL3320A_REG_CONFIG …
#define AL3320A_REG_STATUS …
#define AL3320A_REG_INT …
#define AL3320A_REG_WAIT …
#define AL3320A_REG_CONFIG_RANGE …
#define AL3320A_REG_PERSIST …
#define AL3320A_REG_MEAN_TIME …
#define AL3320A_REG_ADUMMY …
#define AL3320A_REG_DATA_LOW …
#define AL3320A_REG_LOW_THRESH_LOW …
#define AL3320A_REG_LOW_THRESH_HIGH …
#define AL3320A_REG_HIGH_THRESH_LOW …
#define AL3320A_REG_HIGH_THRESH_HIGH …
#define AL3320A_CONFIG_DISABLE …
#define AL3320A_CONFIG_ENABLE …
#define AL3320A_GAIN_MASK …
#define AL3320A_DEFAULT_MEAN_TIME …
#define AL3320A_DEFAULT_WAIT_TIME …
#define AL3320A_SCALE_AVAILABLE …
enum al3320a_range { … };
static const int al3320a_scales[][2] = …;
struct al3320a_data { … };
static const struct iio_chan_spec al3320a_channels[] = …;
static IIO_CONST_ATTR(in_illuminance_scale_available, AL3320A_SCALE_AVAILABLE);
static struct attribute *al3320a_attributes[] = …;
static const struct attribute_group al3320a_attribute_group = …;
static int al3320a_set_pwr(struct i2c_client *client, bool pwr)
{ … }
static void al3320a_set_pwr_off(void *_data)
{ … }
static int al3320a_init(struct al3320a_data *data)
{ … }
static int al3320a_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan, int *val,
int *val2, long mask)
{ … }
static int al3320a_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan, int val,
int val2, long mask)
{ … }
static const struct iio_info al3320a_info = …;
static int al3320a_probe(struct i2c_client *client)
{ … }
static int al3320a_suspend(struct device *dev)
{ … }
static int al3320a_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(al3320a_pm_ops, al3320a_suspend,
al3320a_resume);
static const struct i2c_device_id al3320a_id[] = …;
MODULE_DEVICE_TABLE(i2c, al3320a_id);
static const struct of_device_id al3320a_of_match[] = …;
MODULE_DEVICE_TABLE(of, al3320a_of_match);
static const struct acpi_device_id al3320a_acpi_match[] = …;
MODULE_DEVICE_TABLE(acpi, al3320a_acpi_match);
static struct i2c_driver al3320a_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;