aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorBen Gardner <gardner.ben@gmail.com>2007-12-05 02:45:24 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-12-05 12:21:20 -0500
commit4670df831cb479ba57dd0fa0b8a9eb88cc7129be (patch)
tree4d9a868a29e040f7b20175bfc0051956f015dc12 /drivers/char
parentf1dad166e88a5ddca0acf8f11dea0e2bd92d8bf3 (diff)
gpio_cs5535: disable AUX on output
The AMD CS5535/CS5536 GPIO has two alternate output modes: AUX-1 and AUX-2. When either AUX is enabled, the cs5535_gpio driver cannot control the output. Some BIOS code for the Geode processor enables AUX-1 for GPIO-1, which configures it as the PC BEEP output. This patch will disable AUX-1 and AUX-2 when the user enables output. Signed-of-by: Ben Gardner <gardner.ben@gmail.com> Cc: Richard Knutsson <ricknu-0@student.ltu.se> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/cs5535_gpio.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/char/cs5535_gpio.c b/drivers/char/cs5535_gpio.c
index fe6d2407baed..c2d23cae9515 100644
--- a/drivers/char/cs5535_gpio.c
+++ b/drivers/char/cs5535_gpio.c
@@ -104,6 +104,11 @@ static ssize_t cs5535_gpio_write(struct file *file, const char __user *data,
104 for (j = 0; j < ARRAY_SIZE(rm); j++) { 104 for (j = 0; j < ARRAY_SIZE(rm); j++) {
105 if (c == rm[j].on) { 105 if (c == rm[j].on) {
106 outl(m1, base + rm[j].wr_offset); 106 outl(m1, base + rm[j].wr_offset);
107 /* If enabling output, turn off AUX 1 and AUX 2 */
108 if (c == 'O') {
109 outl(m0, base + 0x10);
110 outl(m0, base + 0x14);
111 }
107 break; 112 break;
108 } else if (c == rm[j].off) { 113 } else if (c == rm[j].off) {
109 outl(m0, base + rm[j].wr_offset); 114 outl(m0, base + rm[j].wr_offset);