summaryrefslogtreecommitdiff
path: root/drivers/iio
diff options
context:
space:
mode:
authorSebastian Reichel <sre@debian.org>2013-10-25 10:10:00 +0100
committerJonathan Cameron <jic23@kernel.org>2013-11-24 21:07:14 +0000
commit8175bff5b47eae171a393f5bd67673de50630973 (patch)
tree0e31f02926dccc950c3f2518cf5953143f28b9b9 /drivers/iio
parentcc26ad455f57b42dd40ca01c4c220516218390f6 (diff)
iio:light:tsl2563: Add DT support
Add Device Tree support for the TSL2563 driver, document the binding and add AMS-TAOS Inc. to the list of vendor prefixes. Signed-off-by: Sebastian Reichel <sre@debian.org> Acked-by: Kumar Gala <galak@codeaurora.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/light/tsl2563.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/iio/light/tsl2563.c b/drivers/iio/light/tsl2563.c
index 5e5d9dea22c5..0c6e459c86b1 100644
--- a/drivers/iio/light/tsl2563.c
+++ b/drivers/iio/light/tsl2563.c
@@ -714,6 +714,7 @@ static int tsl2563_probe(struct i2c_client *client,
struct iio_dev *indio_dev;
struct tsl2563_chip *chip;
struct tsl2563_platform_data *pdata = client->dev.platform_data;
+ struct device_node *np = client->dev.of_node;
int err = 0;
u8 id = 0;
@@ -750,6 +751,9 @@ static int tsl2563_probe(struct i2c_client *client,
if (pdata)
chip->cover_comp_gain = pdata->cover_comp_gain;
+ else if (np)
+ of_property_read_u32(np, "amstaos,cover-comp-gain",
+ &chip->cover_comp_gain);
else
chip->cover_comp_gain = 1;