linux/drivers/iio/light/veml6075.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Vishay VEML6075 UVA and UVB light sensor
 *
 * Copyright 2023 Javier Carrasco <[email protected]>
 *
 * 7-bit I2C slave, address 0x10
 */

#include <linux/bitfield.h>
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/regmap.h>
#include <linux/units.h>

#include <linux/iio/iio.h>

#define VEML6075_CMD_CONF
#define VEML6075_CMD_UVA
#define VEML6075_CMD_UVB
#define VEML6075_CMD_COMP1
#define VEML6075_CMD_COMP2
#define VEML6075_CMD_ID

#define VEML6075_CONF_IT
#define VEML6075_CONF_HD
#define VEML6075_CONF_TRIG
#define VEML6075_CONF_AF
#define VEML6075_CONF_SD

#define VEML6075_IT_50_MS
#define VEML6075_IT_100_MS
#define VEML6075_IT_200_MS
#define VEML6075_IT_400_MS
#define VEML6075_IT_800_MS

#define VEML6075_AF_DISABLE
#define VEML6075_AF_ENABLE

#define VEML6075_SD_DISABLE
#define VEML6075_SD_ENABLE

/* Open-air coefficients and responsivity */
#define VEML6075_A_COEF
#define VEML6075_B_COEF
#define VEML6075_C_COEF
#define VEML6075_D_COEF
#define VEML6075_UVA_RESP
#define VEML6075_UVB_RESP

static const int veml6075_it_ms[] =;

struct veml6075_data {};

/* channel number */
enum veml6075_chan {};

static const struct iio_chan_spec veml6075_channels[] =;

static int veml6075_request_measurement(struct veml6075_data *data)
{}

static int veml6075_uva_comp(int raw_uva, int comp1, int comp2)
{}

static int veml6075_uvb_comp(int raw_uvb, int comp1, int comp2)
{}

static int veml6075_read_comp(struct veml6075_data *data, int *c1, int *c2)
{}

static int veml6075_read_uv_direct(struct veml6075_data *data, int chan,
				   int *val)
{}

static int veml6075_read_int_time_index(struct veml6075_data *data)
{}

static int veml6075_read_int_time_ms(struct veml6075_data *data, int *val)
{}

static int veml6075_get_uvi_micro(struct veml6075_data *data, int uva_comp,
				  int uvb_comp)
{}

static int veml6075_read_uvi(struct veml6075_data *data, int *val, int *val2)
{}

static int veml6075_read_responsivity(int chan, int *val, int *val2)
{}

static int veml6075_read_avail(struct iio_dev *indio_dev,
			       struct iio_chan_spec const *chan,
			       const int **vals, int *type, int *length,
			       long mask)
{}

static int veml6075_read_raw(struct iio_dev *indio_dev,
			     struct iio_chan_spec const *chan,
			     int *val, int *val2, long mask)
{}

static int veml6075_write_int_time_ms(struct veml6075_data *data, int val)
{}

static int veml6075_write_raw(struct iio_dev *indio_dev,
			      struct iio_chan_spec const *chan,
			      int val, int val2, long mask)
{}

static const struct iio_info veml6075_info =;

static bool veml6075_readable_reg(struct device *dev, unsigned int reg)
{}

static bool veml6075_writable_reg(struct device *dev, unsigned int reg)
{}

static const struct regmap_config veml6075_regmap_config =;

static int veml6075_probe(struct i2c_client *client)
{}

static const struct i2c_device_id veml6075_id[] =;
MODULE_DEVICE_TABLE(i2c, veml6075_id);

static const struct of_device_id veml6075_of_match[] =;
MODULE_DEVICE_TABLE(of, veml6075_of_match);

static struct i2c_driver veml6075_driver =;

module_i2c_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();