#5703 HIGH 8.2.0 (: Lid switch detection is unreliable.

Zarro Boogs per Child bugtracker at laptop.org
Mon Jul 28 14:55:47 EDT 2008


#5703: Lid switch detection is unreliable.
-------------------------+--------------------------------------------------
   Reporter:  cjb        |       Owner:  dilinger            
       Type:  defect     |      Status:  new                 
   Priority:  high       |   Milestone:  8.2.0 (was Update.2)
  Component:  kernel     |     Version:                      
 Resolution:             |    Keywords:  power               
Next_action:  never set  |    Verified:  0                   
  Blockedby:             |    Blocking:  6590                
-------------------------+--------------------------------------------------

Comment(by dsaxena):

 Replying to [comment:10 wmb at firmworks.com]:
 > a) Instead of blindly toggling that variable, the current state could be
 read directly from the GPIO readback register, thus ensuring that the
 hardware state is known.

 I trid this as part of my working on #7536 but was getting very bogus data
 from the GPIO_LID readback. This was before I knew about erratum 36 on the
 CS5536 so I need to add a work around for that and see if things work
 after that.

 > b) Alternatively, instead of clearing both edge detector status bits,
 clear only the one that was expected.  The other one will persist, and
 when its edge interrupt is subsequently enabled, a new interrupt will be
 delivered, thus tracking both edges.

 What my WIP patch (attached) for #7536 is doing is just checking for
 negative edge or positive edge, giving negative edge (lid close) priority
 over the positive edge. Since I don't clear the
 opposite edge, I should be able to see a positive edge interrupt
 immediately following a
 negative edge.

-- 
Ticket URL: <http://dev.laptop.org/ticket/5703#comment:11>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list