Openmoko Bug #2145: Debian: Reading of accelerometers broken

Openmoko Public Trac bugs at docs.openmoko.org
Mon Dec 22 22:39:34 CET 2008


#2145: Debian: Reading of accelerometers broken
-------------------------------------+--------------------------------------
    Reporter:  Defiant               |        Owner:  hardware   
        Type:  defect                |       Status:  closed     
    Priority:  normal                |    Milestone:             
   Component:  hardware              |      Version:  unspecified
    Severity:  normal                |   Resolution:  fixed      
    Keywords:  debian event2 event3  |     Haspatch:  0          
   Blockedby:                        |    Estimated:             
 Patchreview:                        |     Blocking:             
Reproducible:  always                |  
-------------------------------------+--------------------------------------

Comment(by Johannes):

 Running the ruby script from Accelerometer_data_retrieval produces this
 output (device is not moved, laying on the table).

 {{{
    90   -36   954   958
    90   -36   972   976
    90   -36   954   958
    90   -36   954   958
    90   -36   954   958
    90   -36   954   958
    90   -36   972   976
 }}}

 Interrupt counts measured at the same time is giving this.

 {{{
 debian-gta02:~# while [ 1 == 1 ] ; do cat /proc/interrupts |grep lis302dl
 ; sleep 10 ; done
  16:        521    s3c-ext0  lis302dl
  60:      38414     s3c-ext  lis302dl
  16:        521    s3c-ext0  lis302dl
  60:      39456     s3c-ext  lis302dl
  16:        521    s3c-ext0  lis302dl
  60:      40503     s3c-ext  lis302dl
 }}}

 So constanly reading from /dev/input/event3 produces approx. 100
 interrupts per 1s.

 Also I modified the ruby script to select before reading, this does not
 change the behaviour at all. Again this looks like reading from
 /dev/input/event3 is triggering the interrupt.

 {{{
 ...
 File.open("/dev/input/event3") do |f|
   while true
     select([f],nil,nil,nil)
     event = f.read(16).unpack("llSSl")
 ...
 }}}

-- 
Ticket URL: <https://docs.openmoko.org/trac/ticket/2145#comment:18>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac


More information about the hardware mailing list