#5703 HIGH 8.2.0 (: Lid switch detection is unreliable.
Zarro Boogs per Child
bugtracker at laptop.org
Mon Jul 28 19:10:03 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 wmb at firmworks.com):
Further experimentation elucidates the GPIO model:
a) The event detector senses 0 to 1 transitions of the readback bit and
the event_enable bit gates its forwarding to the interrupt or power
management event logic.
b) If both edge enables are 0, the readback bit senses the state of the
GPIO pin delayed by 2 clock edges of the 32 kHz clock.
c) If either of the edge enables is 1, the readback bit senses
(pos_edge_status & pos_edge_enable) | (neg_edge_status & neg_edge_enable)
d) The reason why disabling both edge enables causes an event is because
the readback bit switches from sensing the edge detectors to sensing the
pin state, and if the former is 0 while the latter is 1, that causes a
rising edge on the readback bit, triggering an event.
e) There is a subtle difference between the positive edge sensing
represented by both edge enables off versus the pos edge detector on. In
the former case, any 0 to 1 transition on the GPIO pin will retrigger the
event detector, whereas in the latter case, retriggering can only occur
after you clear the pos edge status bit.
--
Ticket URL: <http://dev.laptop.org/ticket/5703#comment:13>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system
More information about the Bugs
mailing list