#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/regmap.h>
#include <linux/util_macros.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/buffer.h>
#include <linux/iio/trigger_consumer.h>
#include <linux/iio/triggered_buffer.h>
#define MAX44000_DRV_NAME …
#define MAX44000_REG_STATUS …
#define MAX44000_REG_CFG_MAIN …
#define MAX44000_REG_CFG_RX …
#define MAX44000_REG_CFG_TX …
#define MAX44000_REG_ALS_DATA_HI …
#define MAX44000_REG_ALS_DATA_LO …
#define MAX44000_REG_PRX_DATA …
#define MAX44000_REG_ALS_UPTHR_HI …
#define MAX44000_REG_ALS_UPTHR_LO …
#define MAX44000_REG_ALS_LOTHR_HI …
#define MAX44000_REG_ALS_LOTHR_LO …
#define MAX44000_REG_PST …
#define MAX44000_REG_PRX_IND …
#define MAX44000_REG_PRX_THR …
#define MAX44000_REG_TRIM_GAIN_GREEN …
#define MAX44000_REG_TRIM_GAIN_IR …
#define MAX44000_CFG_ALSINTE …
#define MAX44000_CFG_PRXINTE …
#define MAX44000_CFG_MASK …
#define MAX44000_CFG_MODE_SHUTDOWN …
#define MAX44000_CFG_MODE_ALS_GIR …
#define MAX44000_CFG_MODE_ALS_G …
#define MAX44000_CFG_MODE_ALS_IR …
#define MAX44000_CFG_MODE_ALS_PRX …
#define MAX44000_CFG_MODE_PRX …
#define MAX44000_CFG_TRIM …
#define MAX44000_REG_CFG_RX_DEFAULT …
#define MAX44000_CFG_RX_ALSTIM_MASK …
#define MAX44000_CFG_RX_ALSTIM_SHIFT …
#define MAX44000_CFG_RX_ALSPGA_MASK …
#define MAX44000_CFG_RX_ALSPGA_SHIFT …
#define MAX44000_LED_CURRENT_MASK …
#define MAX44000_LED_CURRENT_MAX …
#define MAX44000_LED_CURRENT_DEFAULT …
#define MAX44000_ALSDATA_OVERFLOW …
struct max44000_data { … };
#define MAX44000_ALS_TO_LUX_DEFAULT_FRACTION_LOG2 …
static const int max44000_alspga_shift[] = …;
#define MAX44000_ALSPGA_MAX_SHIFT …
#define MAX44000_ALSTIM_SHIFT(alstim) …
static const int max44000_int_time_avail_ns_array[] = …;
static const char max44000_int_time_avail_str[] = …;
static const int max44000_scale_avail_ulux_array[] = …;
static const char max44000_scale_avail_str[] = …;
#define MAX44000_SCAN_INDEX_ALS …
#define MAX44000_SCAN_INDEX_PRX …
static const struct iio_chan_spec max44000_channels[] = …;
static int max44000_read_alstim(struct max44000_data *data)
{ … }
static int max44000_write_alstim(struct max44000_data *data, int val)
{ … }
static int max44000_read_alspga(struct max44000_data *data)
{ … }
static int max44000_write_alspga(struct max44000_data *data, int val)
{ … }
static int max44000_read_alsval(struct max44000_data *data)
{ … }
static int max44000_write_led_current_raw(struct max44000_data *data, int val)
{ … }
static int max44000_read_led_current_raw(struct max44000_data *data)
{ … }
static int max44000_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val, int *val2, long mask)
{ … }
static int max44000_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int val, int val2, long mask)
{ … }
static int max44000_write_raw_get_fmt(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
long mask)
{ … }
static IIO_CONST_ATTR(illuminance_integration_time_available, max44000_int_time_avail_str);
static IIO_CONST_ATTR(illuminance_scale_available, max44000_scale_avail_str);
static struct attribute *max44000_attributes[] = …;
static const struct attribute_group max44000_attribute_group = …;
static const struct iio_info max44000_info = …;
static bool max44000_readable_reg(struct device *dev, unsigned int reg)
{ … }
static bool max44000_writeable_reg(struct device *dev, unsigned int reg)
{ … }
static bool max44000_volatile_reg(struct device *dev, unsigned int reg)
{ … }
static bool max44000_precious_reg(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_config max44000_regmap_config = …;
static irqreturn_t max44000_trigger_handler(int irq, void *p)
{ … }
static int max44000_probe(struct i2c_client *client)
{ … }
static const struct i2c_device_id max44000_id[] = …;
MODULE_DEVICE_TABLE(i2c, max44000_id);
static const struct acpi_device_id max44000_acpi_match[] = …;
MODULE_DEVICE_TABLE(acpi, max44000_acpi_match);
static struct i2c_driver max44000_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;