diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2009-11-22 16:03:25 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-11 12:23:23 -0800 |
commit | dbd5d239e4b24c17ec50bef38aec9bba0e54e1ee (patch) | |
tree | cdb9b532663a4a1814aadfc82632e768e53f9dfc /drivers/staging | |
parent | eaacdd9b31b9dd6b342b569711b69e47dbba19b2 (diff) |
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: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Amit Kucheria <amit.kucheria@verdurent.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/iio/light/Kconfig | 6 | ||||
-rw-r--r-- | drivers/staging/iio/light/tsl2563.c | 11 |
2 files changed, 9 insertions, 8 deletions
diff --git a/drivers/staging/iio/light/Kconfig b/drivers/staging/iio/light/Kconfig index ab541918406b..80cb6e590fbb 100644 --- a/drivers/staging/iio/light/Kconfig +++ b/drivers/staging/iio/light/Kconfig @@ -4,11 +4,11 @@ comment "Light sensors" config SENSORS_TSL2563 - tristate "TAOS TSL2563 ambient light sensor" + tristate "TAOS TSL256[0-3] ambient light sensor" depends on I2C help - If you say yes here you get support for the Taos TSL2563 - ambient light sensor (found in N900). + If you say yes here you get support for the Taos TSL2560, + TSL2561, TSL2562 and TSL2563 ambient light sensors. This driver can also be built as a module. If so, the module will be called tsl2563. diff --git a/drivers/staging/iio/light/tsl2563.c b/drivers/staging/iio/light/tsl2563.c index 3e812b2d0cd4..78b9432c8105 100644 --- a/drivers/staging/iio/light/tsl2563.c +++ b/drivers/staging/iio/light/tsl2563.c @@ -38,8 +38,6 @@ #include "../iio.h" #include "tsl2563.h" -#define DRIVER_NAME "tsl2563" - /* Use this many bits for fraction part. */ #define ADC_FRAC_BITS (14) @@ -738,14 +736,17 @@ out: } 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); static struct i2c_driver tsl2563_i2c_driver = { .driver = { - .name = DRIVER_NAME, + .name = "tsl2563", }, .suspend = tsl2563_suspend, .resume = tsl2563_resume, |