linux/drivers/iio/light/tsl4531.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * tsl4531.c - Support for TAOS TSL4531 ambient light sensor
 *
 * Copyright 2013 Peter Meerwald <[email protected]>
 *
 * IIO driver for the TSL4531x family
 *   TSL45311/TSL45313: 7-bit I2C slave address 0x39
 *   TSL45315/TSL45317: 7-bit I2C slave address 0x29
 *
 * TODO: single cycle measurement
 */

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

#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>

#define TSL4531_DRV_NAME

#define TSL4531_COMMAND

#define TSL4531_CONTROL
#define TSL4531_CONFIG
#define TSL4531_DATA
#define TSL4531_ID

/* operating modes in control register */
#define TSL4531_MODE_POWERDOWN
#define TSL4531_MODE_SINGLE_ADC
#define TSL4531_MODE_NORMAL

/* integration time control in config register */
#define TSL4531_TCNTRL_400MS
#define TSL4531_TCNTRL_200MS
#define TSL4531_TCNTRL_100MS

/* part number in id register */
#define TSL45311_ID
#define TSL45313_ID
#define TSL45315_ID
#define TSL45317_ID
#define TSL4531_ID_SHIFT

struct tsl4531_data {};

static IIO_CONST_ATTR_INT_TIME_AVAIL("0.1 0.2 0.4");

static struct attribute *tsl4531_attributes[] =;

static const struct attribute_group tsl4531_attribute_group =;

static const struct iio_chan_spec tsl4531_channels[] =;

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

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

static const struct iio_info tsl4531_info =;

static int tsl4531_check_id(struct i2c_client *client)
{}

static int tsl4531_probe(struct i2c_client *client)
{}

static int tsl4531_powerdown(struct i2c_client *client)
{}

static void tsl4531_remove(struct i2c_client *client)
{}

static int tsl4531_suspend(struct device *dev)
{}

static int tsl4531_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(tsl4531_pm_ops, tsl4531_suspend,
				tsl4531_resume);

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

static struct i2c_driver tsl4531_driver =;

module_i2c_driver();

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