Received: from mail.onstor.com (66.201.51.107) by exch1.onstor.net
 (10.0.0.225) with Microsoft SMTP Server id 8.1.311.2; Thu, 22 Jan 2009
 10:35:49 -0800
Received: from chiesmta2-2.messageone.com ([216.203.30.55]) by mail.onstor.com
 with Microsoft SMTPSVC(6.0.3790.3959);	 Thu, 22 Jan 2009 10:35:48 -0800
Received: from ftp.linux-mips.org (ftp.linux-mips.org [213.58.128.207])	by
 chiesmta2-2.messageone.com (8.13.8/8.13.8) with ESMTP id n0MIZSj1011691	for
 <andy.sharp@onstor.com>; Thu, 22 Jan 2009 12:35:43 -0600
Received: from localhost.localdomain ([127.0.0.1]:55713 "EHLO
	ftp.linux-mips.org") by ftp.linux-mips.org with ESMTP	id S21103492AbZAVSdP
 (ORCPT <rfc822;andy.sharp@onstor.com>);	Thu, 22 Jan 2009 18:33:15 +0000
Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 22 Jan 2009 18:32:59
 +0000 (GMT)
Received: from orbit.nwl.cc ([91.121.169.95]:22739 "EHLO mail.nwl.cc")	by
 ftp.linux-mips.org with ESMTP id S21103489AbZAVSc4 (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Thu, 22 Jan 2009 18:32:56 +0000
Received: from base (localhost [127.0.0.1])	by mail.nwl.cc (Postfix) with
 ESMTP id 39B48400E106;	Thu, 22 Jan 2009 19:32:51 +0100 (CET)
From: Phil Sutter <n0-1@freewrt.org>
To: Linux-Mips List <linux-mips@linux-mips.org>
CC: Ralf Baechle <ralf@linux-mips.org>
Sender: "linux-mips-bounce@linux-mips.org" <linux-mips-bounce@linux-mips.org>
Date: Thu, 22 Jan 2009 10:32:43 -0800
Subject: [PATCH] MIPS: rb532: export rb532_gpio_set_func()
Thread-Topic: [PATCH] MIPS: rb532: export rb532_gpio_set_func()
Thread-Index: Acl8wD9G5/koAdTaSNqGJlqONTFaJA==
Message-ID: <20090122183251.39B48400E106@mail.nwl.cc>
References: <20081128193322.D103C386DBBE@mail.ifyouseekate.net>
In-Reply-To: <20081128193322.D103C386DBBE@mail.ifyouseekate.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Exchange-Organization-AuthAs: Internal
X-MS-Exchange-Organization-AuthMechanism: 0b
X-MS-Exchange-Organization-AuthSource: exch1.onstor.net
X-MS-Has-Attach:
X-Auto-Response-Suppress: All
X-MS-TNEF-Correlator:
x-originalarrivaltime: 22 Jan 2009 18:35:48.0698 (UTC)
 FILETIME=[3EDC9BA0:01C97CC0]
errors-to: linux-mips-bounce@linux-mips.org
x-ems-proccessed: 2K3Xl1OQTInXD6xxuA8z3Q==
x-ems-stamp: LaGyaZ/JlCmicZ+DJlHHjg==
x-messageone-virus-version: vendor=fsecure
 engine=4.65.7400:2.4.4,1.2.40,4.0.164
 definitions=2009-01-22_13:2009-01-21,2009-01-22,2009-01-22 signatures=0
x-messageone-virus-scanned: Clean
x-messageone-envelope-sender: linux-mips-bounce@linux-mips.org
x-messageone-spam-details: rule=m773emszm_notspam policy=m773emszm score=0
 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam
 adjust=0 reason=mlx engine=3.1.0-0810130000 definitions=main-0901220130
x-messageone-spam-score: 0
x-messageone-spam-bar:
x-list: linux-mips
x-archive-position: 21798
x-ecartis-version: Ecartis v1.0.0
x-original-sender: n0-1@freewrt.org
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

This kernel symbol provides a way for drivers to switch on alternate
function for a certain GPIO pin. Turning it off is done implicitly when
changing the GPIO direction, as that would be fixed when using the given
pin als alternate function.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
---
 arch/mips/include/asm/mach-rc32434/gpio.h |    1 +
 arch/mips/rb532/gpio.c                    |    5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/mips/include/asm/mach-rc32434/gpio.h b/arch/mips/include/=
asm/mach-rc32434/gpio.h
index ca92c81..3cb50d1 100644
--- a/arch/mips/include/asm/mach-rc32434/gpio.h
+++ b/arch/mips/include/asm/mach-rc32434/gpio.h
@@ -82,5 +82,6 @@ struct rb532_gpio_reg {
=20
 extern void rb532_gpio_set_ilevel(int bit, unsigned gpio);
 extern void rb532_gpio_set_istat(int bit, unsigned gpio);
+extern void rb532_gpio_set_func(unsigned gpio);
=20
 #endif /* _RC32434_GPIO_H_ */
diff --git a/arch/mips/rb532/gpio.c b/arch/mips/rb532/gpio.c
index f338681..37de05d 100644
--- a/arch/mips/rb532/gpio.c
+++ b/arch/mips/rb532/gpio.c
@@ -174,10 +174,11 @@ EXPORT_SYMBOL(rb532_gpio_set_istat);
 /*
  * Configure GPIO alternate function
  */
-static void rb532_gpio_set_func(int bit, unsigned gpio)
+void rb532_gpio_set_func(unsigned gpio)
 {
-       rb532_set_bit(bit, gpio, rb532_gpio_chip->regbase + GPIOFUNC);
+       rb532_set_bit(1, gpio, rb532_gpio_chip->regbase + GPIOFUNC);
 }
+EXPORT_SYMBOL(rb532_gpio_set_func);
=20
 int __init rb532_gpio_init(void)
 {
--=20
1.5.6.4


