Re: [PATCH v6 2/2] iio: light: isl76682: Add ISL76682 driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 5 Dec 2023 02:43:30 +0100
Marek Vasut <marex@xxxxxxx> wrote:

> On 12/4/23 12:29, Jonathan Cameron wrote:
> > On Mon, 27 Nov 2023 22:26:53 +0100
> > Marek Vasut <marex@xxxxxxx> wrote:
> >   
> >> The ISL76682 is very basic ALS which only supports ALS or IR mode
> >> in four ranges, 1k/4k/16k/64k LUX. There is no IRQ support or any
> >> other fancy functionality.
> >>
> >> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> >> Reviewed-by: Matti Vaittinen <mazziesaccount@xxxxxxxxx>
> >> Signed-off-by: Marek Vasut <marex@xxxxxxx>  
> > 
> > There is a additional question on what scale means for
> > an IR channel.  There aren't any well defined units (as it depends
> > on the sensitivity curve) so in general we avoid providing scale
> > for intensity readings.
> > 
> > The datasheet has a vague go at working around this problem by
> > using counts relative to IR measurement in daylight which would
> > measure 210 LUX.  (via faking that with a 850nm green led??)
> > 
> > That's far from a standard..
> > 
> > We do have precedence of scale applied to intensity channels
> > so I guess the ship has sailed.
> > 
> > Perhaps we should just add an explicit not to the ABI docs
> > to cover that changing the scale in these sensors will result
> > in the counts changing, but multiplying raw by scale isn't going
> > to give any sensible units.
> > 
> > So probably not a thing to fix in this series, but to address
> > separately.  
> 
> Is something like this what you have in mind ?

Yes, something along those lines.  We could add more detail on why
but perhaps that would just confuse things more than just stating
it is the case.

> 
> diff --git a/Documentation/ABI/testing/sysfs-bus-iio 
> b/Documentation/ABI/testing/sysfs-bus-iio
> index 0eadc08c3a139..584607f560d02 100644
> --- a/Documentation/ABI/testing/sysfs-bus-iio
> +++ b/Documentation/ABI/testing/sysfs-bus-iio
> @@ -618,7 +618,9 @@ KernelVersion:      2.6.35
>   Contact:       linux-iio@xxxxxxxxxxxxxxx
>   Description:
>                  If a discrete set of scale values is available, they
> -               are listed in this attribute.
> +               are listed in this attribute. Unlike illumination,
> +               multiplying intensity by intensity_scale does not
> +               yield value with any standardized unit .
> 
>   What:          /sys/bus/iio/devices/iio:deviceX/out_voltageY_hardwaregain
>   What:          /sys/bus/iio/devices/iio:deviceX/in_intensity_hardwaregain
> 





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux