linux/drivers/iio/light/veml6040.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Vishay VEML6040 RGBW light sensor driver
 *
 * Copyright (C) 2024 Sentec AG
 * Author: Arthur Becker <[email protected]>
 *
 */

#include <linux/bitfield.h>
#include <linux/err.h>
#include <linux/i2c.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/module.h>
#include <linux/regmap.h>

/* VEML6040 Configuration Registers
 *
 * SD: Shutdown
 * AF: Auto / Force Mode (Auto Measurements On:0, Off:1)
 * TR: Trigger Measurement (when AF Bit is set)
 * IT: Integration Time
 */
#define VEML6040_CONF_REG
#define VEML6040_CONF_SD_MSK
#define VEML6040_CONF_AF_MSK
#define VEML6040_CONF_TR_MSK
#define VEML6040_CONF_IT_MSK
#define VEML6040_CONF_IT_40_MS
#define VEML6040_CONF_IT_80_MS
#define VEML6040_CONF_IT_160_MS
#define VEML6040_CONF_IT_320_MS
#define VEML6040_CONF_IT_640_MS
#define VEML6040_CONF_IT_1280_MS

/* VEML6040 Read Only Registers */
#define VEML6040_REG_R
#define VEML6040_REG_G
#define VEML6040_REG_B
#define VEML6040_REG_W

static const int veml6040_it_ms[] =;

enum veml6040_chan {};

struct veml6040_data {};

static const struct regmap_config veml6040_regmap_config =;

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

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

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

static const struct iio_info veml6040_info =;

static const struct iio_chan_spec veml6040_channels[] =;

static void veml6040_shutdown_action(void *data)
{}

static int veml6040_probe(struct i2c_client *client)
{}

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

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

static struct i2c_driver veml6040_driver =;
module_i2c_driver();

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