lkml.org 
[lkml]   [2014]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] iio: tsl2563: Initialize channels
On 12.01.2014 22:55, Peter Meerwald wrote:
>
> I think the fix should rather be
>
> if (chan->channel2 == IIO_MOD_LIGHT_BOTH)
> chip->calib0 = calib_from_sysfs(val);
> else if (chan->channel2 == IIO_MOD_LIGHT_IR)
> chip->calib1 = calib_from_sysfs(val);
> else
> return -EINVAL;
>
> since only the INTENSITY channels have a CALIBSCALE info
>
> the light channel incorrectly sets .indexed = 1 and .channel = 0 which
> should be unnecessary since there is only one IIO_LIGHT channel
>
> regards, p.
>

I thought so when I was preparing the patch, but unfortunately couldn't
find any documentation for iio subsystem structs and defines, besides
what is in the header files (and it is not very descriptive), so I took
the easy route.

However, I'll send a new patch with the above (and a little more) changes.

Thanks,
Ivo



\
 
 \ /
  Last update: 2014-01-12 22:21    [W:0.057 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site