Re: ACPI ambient light sensor

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

 



On Sat, Oct 27, 2012 at 6:08 PM, Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> On 10/27/2012 05:39 PM, Martin Liška wrote:
>> Hello,
>>    I hope being root should not bring any permission issues for the file:
>>
>> ls -l /sys/bus/iio/devices/iio\:device0/scan_elements/in_illuminance1_en
>> *-rw-r--r--* 1 root root 4096 Oct 27 15:54 /sys/bus/iio/devices/iio:device0/scan_elements/in_illuminance1_en
>>
>> After adding debug print to ii_scan_el_show gives me really *-1* and ***indio_dev->buffer->scan_mask is *1 *and echo
>> command settings "1" is processed in *in_scan_el_store* function with ret == 0.
> Chase it all the way back and find out where that -1 is coming form. I really can't
> guess at the moment. There is only a test_bit and an sprintf if there... Not much scope
> really. If it's giving a  string containing -1 then it must be from test bit, if returning
> -1 from the sprintf.  I didn't think test_bit could return an error so we don't check
> ret from that.

Try to add some printk inside iio code directly, including iio_scan_el_show.
You can also build you kernel with debug symbols and trace support,
and use ftrace to trace the kernel calls:
http://lwn.net/Articles/365835/.

-- 
Corentin Chary
http://xf.iksaif.net
--
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