Commit dbd5d239 authored by Jonathan Cameron's avatar Jonathan Cameron Committed by Greg Kroah-Hartman

Staging: IIO: Add tsl2560-2 support to tsl2563 driver.

Minimal changes to driver. Just adds the device to the id
table and adjusts the Kconfig elements appropriately.

Adding further similar chips from TAOS is complicated by their
different conversion functions (and hence left for now).
Signed-off-by: default avatarJonathan Cameron <jic23@cam.ac.uk>
Acked-by: default avatarAmit Kucheria <amit.kucheria@verdurent.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent eaacdd9b
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
comment "Light sensors" comment "Light sensors"
config SENSORS_TSL2563 config SENSORS_TSL2563
tristate "TAOS TSL2563 ambient light sensor" tristate "TAOS TSL256[0-3] ambient light sensor"
depends on I2C depends on I2C
help help
If you say yes here you get support for the Taos TSL2563 If you say yes here you get support for the Taos TSL2560,
ambient light sensor (found in N900). TSL2561, TSL2562 and TSL2563 ambient light sensors.
This driver can also be built as a module. If so, the module This driver can also be built as a module. If so, the module
will be called tsl2563. will be called tsl2563.
......
...@@ -38,8 +38,6 @@ ...@@ -38,8 +38,6 @@
#include "../iio.h" #include "../iio.h"
#include "tsl2563.h" #include "tsl2563.h"
#define DRIVER_NAME "tsl2563"
/* Use this many bits for fraction part. */ /* Use this many bits for fraction part. */
#define ADC_FRAC_BITS (14) #define ADC_FRAC_BITS (14)
...@@ -738,14 +736,17 @@ static int tsl2563_resume(struct i2c_client *client) ...@@ -738,14 +736,17 @@ static int tsl2563_resume(struct i2c_client *client)
} }
static const struct i2c_device_id tsl2563_id[] = { static const struct i2c_device_id tsl2563_id[] = {
{ DRIVER_NAME, 0 }, { "tsl2560", 0 },
{ }, { "tsl2561", 1 },
{ "tsl2562", 2 },
{ "tsl2563", 3 },
{}
}; };
MODULE_DEVICE_TABLE(i2c, tsl2563_id); MODULE_DEVICE_TABLE(i2c, tsl2563_id);
static struct i2c_driver tsl2563_i2c_driver = { static struct i2c_driver tsl2563_i2c_driver = {
.driver = { .driver = {
.name = DRIVER_NAME, .name = "tsl2563",
}, },
.suspend = tsl2563_suspend, .suspend = tsl2563_suspend,
.resume = tsl2563_resume, .resume = tsl2563_resume,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment