[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-iio
Subject:    Re: ACPI ambient light sensor
From:       Corentin Chary <corentin.chary () gmail ! com>
Date:       2012-10-27 18:00:58
Message-ID: CAHR064j_7Y3wYXVXmC4TqZHxkqa0Z2HK84-OaDTiC7oesB_TrQ () mail ! gmail ! com
[Download RAW message or body]

On Sat, Oct 27, 2012 at 6:08 PM, Jonathan Cameron <jic23@kernel.org> 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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic