aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/light/si1133.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-08-01iio: light: si1133: fix uninitialized resp variableMaxime Roussin-Bélanger1-0/+3
Read response register to detect any error. Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-30iio: light: si1133 fix test for val being not zero or not one.Colin Ian King1-1/+1
The current check on val always results in true and so the call to sii1133_update_adcsens never gets called. Fix this check so it returns with -EINVAL only when val is not zero and not one. Detected by CoverityScan, CID#1472099 ("Logically dead code") Fixes: e01e7eaf37d8 ("iio: light: introduce si1133") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-23iio: light: introduce si1133Maxime Roussin-Bélanger1-0/+1068
e-mail received from Silicon Lab to confirm that the licensing isn't a problem. " Dear Maxime Roussin-Belanger, The LUX calculation code only works with Si1133. As long as the software is used with Silicon Lab's sensor product, I don't see any problem. Regards, Tony " Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com> Reviewed-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>