Ticket #1330 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

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:1 Changed 11 years ago by mickey@…

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.

comment:2 Changed 11 years ago by mickey@…

* Bug 1329 has been marked as a duplicate of this bug. *

comment:3 Changed 11 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.

comment:4 Changed 11 years ago by zecke@…

  • Status changed from new to closed
  • Resolution set to fixed

I consider this fixed in the stable branch.

Note: See TracTickets for help on using tickets.