#include <linux/i2c.h>
#include <linux/math.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/regmap.h>
#include <linux/bitfield.h>
#include <linux/iio/iio.h>
#include <linux/unaligned.h>
#define LTR390_MAIN_CTRL …
#define LTR390_ALS_UVS_MEAS_RATE …
#define LTR390_ALS_UVS_GAIN …
#define LTR390_PART_ID …
#define LTR390_ALS_DATA …
#define LTR390_UVS_DATA …
#define LTR390_INT_CFG …
#define LTR390_PART_NUMBER_ID …
#define LTR390_ALS_UVS_GAIN_MASK …
#define LTR390_ALS_UVS_INT_TIME_MASK …
#define LTR390_ALS_UVS_INT_TIME(x) …
#define LTR390_SW_RESET …
#define LTR390_UVS_MODE …
#define LTR390_SENSOR_ENABLE …
#define LTR390_FRACTIONAL_PRECISION …
#define LTR390_COUNTS_PER_UVI …
#define LTR390_WINDOW_FACTOR …
enum ltr390_mode { … };
struct ltr390_data { … };
static const struct regmap_config ltr390_regmap_config = …;
static int ltr390_register_read(struct ltr390_data *data, u8 register_address)
{ … }
static int ltr390_set_mode(struct ltr390_data *data, enum ltr390_mode mode)
{ … }
static int ltr390_counts_per_uvi(struct ltr390_data *data)
{ … }
static int ltr390_read_raw(struct iio_dev *iio_device,
struct iio_chan_spec const *chan, int *val,
int *val2, long mask)
{ … }
static const int ltr390_int_time_map_us[] = …;
static const int ltr390_gain_map[] = …;
static const struct iio_chan_spec ltr390_channels[] = …;
static int ltr390_set_gain(struct ltr390_data *data, int val)
{ … }
static int ltr390_set_int_time(struct ltr390_data *data, int val)
{ … }
static int ltr390_read_avail(struct iio_dev *indio_dev, struct iio_chan_spec const *chan,
const int **vals, int *type, int *length, long mask)
{ … }
static int ltr390_write_raw(struct iio_dev *indio_dev, struct iio_chan_spec const *chan,
int val, int val2, long mask)
{ … }
static const struct iio_info ltr390_info = …;
static int ltr390_probe(struct i2c_client *client)
{ … }
static const struct i2c_device_id ltr390_id[] = …;
MODULE_DEVICE_TABLE(i2c, ltr390_id);
static const struct of_device_id ltr390_of_table[] = …;
MODULE_DEVICE_TABLE(of, ltr390_of_table);
static struct i2c_driver ltr390_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;