linux/drivers/iio/light/isl76682.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * IIO driver for the light sensor ISL76682.
 * ISL76682 is Ambient Light Sensor
 *
 * Copyright (c) 2023 Marek Vasut <[email protected]>
 */

#include <linux/array_size.h>
#include <linux/bits.h>
#include <linux/cleanup.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/types.h>

#include <linux/iio/iio.h>

#define ISL76682_REG_COMMAND

#define ISL76682_COMMAND_EN
#define ISL76682_COMMAND_MODE_CONTINUOUS
#define ISL76682_COMMAND_LIGHT_IR

#define ISL76682_COMMAND_RANGE_LUX_1K
#define ISL76682_COMMAND_RANGE_LUX_4K
#define ISL76682_COMMAND_RANGE_LUX_16K
#define ISL76682_COMMAND_RANGE_LUX_64K
#define ISL76682_COMMAND_RANGE_LUX_MASK

#define ISL76682_REG_ALSIR_L

#define ISL76682_REG_ALSIR_U

#define ISL76682_NUM_REGS

#define ISL76682_CONV_TIME_MS
#define ISL76682_INT_TIME_US

#define ISL76682_ADC_MAX

struct isl76682_chip {};

struct isl76682_range {};

static struct isl76682_range isl76682_range_table[] =;

static int isl76682_get(struct isl76682_chip *chip, bool mode_ir, int *data)
{}

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

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

static int illuminance_scale_available[] =;

static int intensity_scale_available[] =;

static int isl76682_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_chan_spec isl76682_channels[] =;

static const struct iio_info isl76682_info =;

static int isl76682_clear_configure_reg(struct isl76682_chip *chip)
{}

static void isl76682_reset_action(void *chip)
{}

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

static const struct regmap_config isl76682_regmap_config =;

static int isl76682_probe(struct i2c_client *client)
{}

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

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

static struct i2c_driver isl76682_driver =;
module_i2c_driver();

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