Ticket #1330 (closed defect: fixed)
GTA02: LEDs are not individually controllable
| Reported by: | mickey@… | Owned by: | openmoko-kernel@… |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | kernel | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: | buglog@… | Blocked By: | |
| Blocking: | Estimated Completion (week): | ||
| HasPatchForReview: | PatchReviewResult: | ||
| Reproducible: |
Description
If you turn one LED off, all others go off as well. The device driver probably
needs a shadow register for the GPIOs.
Change History
comment:3 Changed 5 years ago by zecke@…
I posted a patch for review on the openmoko kernel mailinglist. Basicly due the
LED connection you can not set any pin individually on the GPIO Bank the LEDs
are connected to. This is because on write the current state is read, the bit to
change masked out, ored into. On reading the LED state is 'lost'/0.
So every write access to the GPIO bank B needs to add the LED state before
writing out the value. Otherwise your LEDs would go off when you start the
vibrator or turn on the modem.
Note: See
TracTickets for help on using
tickets.

To reproduce:
echo "1" >/sys/class/leds/gta02-aux\:red/brightness
Effect: AUX LED is on
echo "1" >/sys/class/leds/gta02-power\:orange/brightness
Effect: Orange POWER LED is on, but... AUX LED is off
D'oh.