Re: [RFC/PATCH] iio: light: add support for TI's opt3001 ligth sensor

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

 



On 07/08/14 17:36, Felipe Balbi wrote:
> Hi,
> 
> On Thu, Aug 07, 2014 at 05:27:56PM +0100, Jonathan Cameron wrote:
>>>>>>> + +	if (opt->mode == OPT3001_CONFIGURATION_M_CONTINUOUS) +		return -EBUSY; + +	if (chan->type != IIO_LIGHT)
>>>>>>> + return -EINVAL; + +	mutex_lock(&opt->lock); + +	switch (mask) {
>>>>>>
>>>>>> is there no way to control the scale?
>>>>>
>>>>> yeah, but the HW does auto-scaling which works pretty well. Why would you want to control the scale manually ?
>>>> On a slow device like this you probably wouldn't but for quicker devices the overhead of converting into a
>>>> standard form in kernel might be excessive.
>>>
>>> hehe, even when you _do_ set the scale, you still have the top 4
>>> bits as exponent, the difference is that you know what they are
>>> before the conversion is done :-)
>> Then you can junk them and let userspace use the known value to deal
>> with the raw data.
> 
> alright, I'll leave that to a future patch then. Auto-ranging is so much
> simpler.
> 
Agreed - it's just unusual for it to actually be present on the device.
--
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