mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ben Gardner" <gardner.ben@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: "Andrew Morton" <akpm@osdl.org>
Subject: [PATCH] gpio_cs5535: disable AUX on output
Date: Mon, 3 Dec 2007 11:14:01 -0600	[thread overview]
Message-ID: <808c8e9d0712030914x513c95b8r9daa4e97ada97511@mail.gmail.com> (raw)

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>

--- linux-2.6.23.1.orig/drivers/char/cs5535_gpio.c	2007-10-12
11:43:44.000000000 -0500
+++ linux-2.6.23.1/drivers/char/cs5535_gpio.c	2007-12-03
09:25:49.000000000 -0600
@@ -104,6 +104,11 @@
 		for (j = 0; j < ARRAY_SIZE(rm); j++) {
 			if (c == rm[j].on) {
 				outl(m1, base + rm[j].wr_offset);
+				/* If enabling output, turn off AUX 1 and AUX 2 */
+				if (c == 'O') {
+					outl(m0, base + 0x10);
+					outl(m0, base + 0x14);
+				}
 				break;
 			} else if (c == rm[j].off) {
 				outl(m0, base + rm[j].wr_offset);

                 reply	other threads:[~2007-12-03 17:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=808c8e9d0712030914x513c95b8r9daa4e97ada97511@mail.gmail.com \
    --to=gardner.ben@gmail.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®