Skip to contentSkip to conversation

iio: max44000: correct value in illuminance_integration_time_available

PATCH In review Akinobu Mita 2 participants 2 messages Dec 28, 2016 – Dec 30, 2016 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: max44000: correct value in illuminance_integration_time_available

According to the datasheet, the shortest available integration time for ALS ADC conversion is 1.5625ms but illuminance_integration_time_available sysfs file shows wrong value.

Cc Crestez Dan Leonard <[email protected]>
Cc Jonathan Cameron <[email protected]>
Cc Hartmut Knaack <[email protected]>
Cc Lars-Peter Clausen <[email protected]>
Cc Peter Meerwald-Stadler <[email protected]>
---
 drivers/iio/light/max44000.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/light/max44000.c +1 -1
index a144ca3..81bd8e8 100644
@@ -113,7 +113,7 @@ static const char max44000_int_time_avail_str[] =
 	"0.100 "
 	"0.025 "
 	"0.00625 "
-	"0.001625";
+	"0.0015625";
 
 /* Available scales (internal to ulux) with pretty manual alignment: */
 static const int max44000_scale_avail_ulux_array[] = {
Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 10 lines · Akinobu Mita

According to the datasheet, the shortest available integration time for ALS ADC conversion is 1.5625ms but illuminance_integration_time_available sysfs file shows wrong value.

Cc Crestez Dan Leonard <[email protected]>
Cc Jonathan Cameron <[email protected]>
Cc Hartmut Knaack <[email protected]>
Cc Lars-Peter Clausen <[email protected]>
Cc Peter Meerwald-Stadler <[email protected]>

Good find. Applied to the fixes-togreg-post-rc1 branch of iio.git and marked for stable with a fixes tag added. It might apply cleanly along the way, but the original bug was quite a few patches back.

Jonathan

Quoted 18 lines
---
 drivers/iio/light/max44000.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/light/max44000.c +1 -1
index a144ca3..81bd8e8 100644
@@ -113,7 +113,7 @@ static const char max44000_int_time_avail_str[] =
 	"0.100 "
 	"0.025 "
 	"0.00625 "
-	"0.001625";
+	"0.0015625";
 
 /* Available scales (internal to ulux) with pretty manual alignment: */
 static const int max44000_scale_avail_ulux_array[] = {