Re: [PATCH] iio: light: new driver for the ROHM BH1780

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

 



On Tue, Mar 29, 2016 at 4:46 PM, Peter Meerwald-Stadler
<pmeerw@xxxxxxxxxx> wrote:
> [Me]

> my nitpicking below

Fixed all of it, except:

>> +     case IIO_CHAN_INFO_SCALE:
>> +             /* Returns raw lux value */
>> +             *val = 1;
>
> not needed to scale by 1.0
>
>> +             *val2 = 0;
>> +             return IIO_VAL_INT;

How do you mean?
If I don't implement this (just let this function return negative)
this happens:

iio:device1 ls
dev                              of_node
in_illuminance_integration_time  power
in_illuminance_raw               subsystem
in_illuminance_scale             uevent

iio:device1 cat in_illuminance_scale
cat: read error: Invalid argument

Do you mean all userspace programs should assume scale by 1x
if they get an error when they try to read the scale file, or is there
a bug in IIO such that this file should return "1" if the callback asking for
IIO_CHAN_INFO_SCALE returns negative?

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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