[Trac #845] Sugar needs support for the SW_LID event
Zarro Boogs per Child
bugtracker at laptop.org
Mon Jan 29 16:29:45 EST 2007
#845: Sugar needs support for the SW_LID event
--------------------------+-------------------------------------------------
Reporter: JordanCrouse | Owner: dcbw
Type: defect | Status: new
Priority: normal | Milestone: Untriaged
Component: sugar | Resolution:
Keywords: |
--------------------------+-------------------------------------------------
Comment (by JordanCrouse):
SW_LID is triggered from input events GPIO26. On B2, GPIO26 is connected
to the PWR_BUT_in line which is driven by S1, which is a hall effect
sensor (part # APX9132ATI-TRL). Put simply, hall effect sensors detect
the presence of a magnetic field. S1 is physically located on the "back"
(side w/o the CPU) of the board, just above the audio input switch. When
the lid is lowered, that side of the board comes into proximity to the
left corner of the base, which is presumably where the magnet is located.
On the OLPC, the line is high when the LID is open (no magnetic field) and
low when it is closed. We are able to detect this event in B2, because
PWR_BUT_in was moved from a GPIO on the EC, to a GPIO on the 5536, where
we can directly access it from the Linux kernel.
There is an identical hall effect sensor (S2) on the opposite side
("front" of the board, just above the horizontal USB port on the left hand
side). The positioning is such that when the screen is turned and placed
into ebook mode, this sensor could detect the same magnetic field used for
the LID event. Unfortunately, on B2, the line from this sensor is still
connected to the EC, and we don't yet have an infrastructure for reading
it (see #224). Also note that this sensor only detects proximity, there
isn't any way to tell if the screen is physically rotated or not.
--
Ticket URL: <http://dev.laptop.org/ticket/845#comment:2>
One Laptop Per Child <http://laptop.org/>
More information about the Bugs
mailing list