linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: max44000: correct value in illuminance_integration_time_available
@ 2016-12-28 17:16 Akinobu Mita
  2016-12-30 20:22 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Akinobu Mita @ 2016-12-28 17:16 UTC (permalink / raw)
  To: linux-iio
  Cc: Akinobu Mita, Crestez Dan Leonard, Jonathan Cameron,
	Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler

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 <leonard.crestez@intel.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Hartmut Knaack <knaack.h@gmx.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
 drivers/iio/light/max44000.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/light/max44000.c b/drivers/iio/light/max44000.c
index a144ca3..81bd8e8 100644
--- a/drivers/iio/light/max44000.c
+++ b/drivers/iio/light/max44000.c
@@ -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[] = {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] iio: max44000: correct value in illuminance_integration_time_available
  2016-12-28 17:16 [PATCH] iio: max44000: correct value in illuminance_integration_time_available Akinobu Mita
@ 2016-12-30 20:22 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2016-12-30 20:22 UTC (permalink / raw)
  To: Akinobu Mita, linux-iio
  Cc: Crestez Dan Leonard, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler

On 28/12/16 17:16, Akinobu Mita wrote:
> 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 <leonard.crestez@intel.com>
> Cc: Jonathan Cameron <jic23@kernel.org>
> Cc: Hartmut Knaack <knaack.h@gmx.de>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
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
> ---
>  drivers/iio/light/max44000.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/light/max44000.c b/drivers/iio/light/max44000.c
> index a144ca3..81bd8e8 100644
> --- a/drivers/iio/light/max44000.c
> +++ b/drivers/iio/light/max44000.c
> @@ -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[] = {
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-30 20:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-28 17:16 [PATCH] iio: max44000: correct value in illuminance_integration_time_available Akinobu Mita
2016-12-30 20:22 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).