]> git.karo-electronics.de Git - karo-tx-linux.git/commit
cs5535-gpio: apply CS5536 errata workaround for GPIOs
authorAndres Salomon <dilinger@queued.net>
Thu, 2 Dec 2010 22:31:17 +0000 (14:31 -0800)
committerAndi Kleen <ak@linux.intel.com>
Tue, 14 Dec 2010 22:40:14 +0000 (23:40 +0100)
commit6c615d59289dc9e2034647f0c912561d30bdb473
tree11869f09bfcd9fd2d1770d19a3eced461840316e
parent962b4a64f5210a4aaefd09c318e6dd05242df0ce
cs5535-gpio: apply CS5536 errata workaround for GPIOs

commit 853ff88324a248a9f5da6e110850223db353ec07 upstream.

The AMD Geode CS5536 Companion Device Silicon Revision B1 Specification
Update mentions the follow as issue #36:

 "Atomic write transactions to the atomic GPIO High Bank Feature Bit
  registers should only affect the bits selected [...]"

 "after Suspend, an atomic write transaction [...] will clear all
  non-selected bits of the accessed register."

In other words, writing to the high bank for a single GPIO bit will
clear every other GPIO bit (but only sometimes after a suspend).

The workaround described is obvious and simple; do a read-modify-write.
This patch does that, and documents why we're doing it.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
drivers/gpio/cs5535-gpio.c