linux/drivers/iio/light/isl29125.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * isl29125.c - Support for Intersil ISL29125 RGB light sensor
 *
 * Copyright (c) 2014 Peter Meerwald <[email protected]>
 *
 * RGB light sensor with 16-bit channels for red, green, blue);
 * 7-bit I2C slave address 0x44
 *
 * TODO: interrupt support, IR compensation, thresholds, 12bit
 */

#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/delay.h>
#include <linux/pm.h>

#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/trigger_consumer.h>
#include <linux/iio/buffer.h>
#include <linux/iio/triggered_buffer.h>

#define ISL29125_DRV_NAME

#define ISL29125_DEVICE_ID
#define ISL29125_CONF1
#define ISL29125_CONF2
#define ISL29125_CONF3
#define ISL29125_STATUS
#define ISL29125_GREEN_DATA
#define ISL29125_RED_DATA
#define ISL29125_BLUE_DATA

#define ISL29125_ID

#define ISL29125_MODE_MASK
#define ISL29125_MODE_PD
#define ISL29125_MODE_G
#define ISL29125_MODE_R
#define ISL29125_MODE_B
#define ISL29125_MODE_RGB

#define ISL29125_SENSING_RANGE_0
#define ISL29125_SENSING_RANGE_1

#define ISL29125_MODE_RANGE

#define ISL29125_STATUS_CONV

struct isl29125_data {};

#define ISL29125_CHANNEL(_color, _si)

static const struct iio_chan_spec isl29125_channels[] =;

static const struct {} isl29125_regs[] =;

static int isl29125_read_data(struct isl29125_data *data, int si)
{}

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

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

static irqreturn_t isl29125_trigger_handler(int irq, void *p)
{}

static IIO_CONST_ATTR(scale_available, "0.005722 0.152590");

static struct attribute *isl29125_attributes[] =;

static const struct attribute_group isl29125_attribute_group =;

static const struct iio_info isl29125_info =;

static int isl29125_buffer_postenable(struct iio_dev *indio_dev)
{}

static int isl29125_buffer_predisable(struct iio_dev *indio_dev)
{}

static const struct iio_buffer_setup_ops isl29125_buffer_setup_ops =;

static int isl29125_probe(struct i2c_client *client)
{}

static int isl29125_powerdown(struct isl29125_data *data)
{}

static void isl29125_remove(struct i2c_client *client)
{}

static int isl29125_suspend(struct device *dev)
{}

static int isl29125_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(isl29125_pm_ops, isl29125_suspend,
				isl29125_resume);

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

static struct i2c_driver isl29125_driver =;
module_i2c_driver();

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