linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* sharp c-3000 aka spitz: fix warn_on introduced in 2.6.32-rc1
@ 2010-01-06  7:10 Pavel Machek
  2010-01-06  7:17 ` Eric Miao
  0 siblings, 1 reply; 16+ messages in thread
From: Pavel Machek @ 2010-01-06  7:10 UTC (permalink / raw)
  To: linux-arm-kernel


Sharp-SL code uses strange, complex grouping of gpios for wakeups
toggling. Fortunately, it is unneeded in recent kernels (and actually
provokes WARN_ONs during resume). Remove it.

Signed-off-by: Pavel Machek <pavel@ucw.cz>

--- a/arch/arm/mach-pxa/mfp-pxa2xx.c	2009-09-10 00:13:59.000000000 +0200
+++ b/arch/arm/mach-pxa/mfp-pxa2xx.c	2009-12-29 03:16:40.000000000 +0100
@@ -34,7 +34,6 @@
 struct gpio_desc {
 	unsigned	valid		: 1;
 	unsigned	can_wakeup	: 1;
-	unsigned	keypad_gpio	: 1;
 	unsigned	dir_inverted	: 1;
 	unsigned int	mask; /* bit mask in PWER or PKWR */
 	unsigned int	mux_mask; /* bit mask of muxed gpio bits, 0 if no mux */
@@ -178,9 +177,6 @@
 	if (!d->valid)
 		return -EINVAL;
 
-	if (d->keypad_gpio)
-		return -EINVAL;
-
 	mux_taken = (PWER & d->mux_mask) & (~d->mask);
 	if (on && mux_taken)
 		return -EBUSY;
@@ -231,32 +227,6 @@
 #endif /* CONFIG_PXA25x */
 
 #ifdef CONFIG_PXA27x
-static int pxa27x_pkwr_gpio[] = {
-	13, 16, 17, 34, 36, 37, 38, 39, 90, 91, 93, 94,
-	95, 96, 97, 98, 99, 100, 101, 102
-};
-
-int keypad_set_wake(unsigned int on)
-{
-	unsigned int i, gpio, mask = 0;
-
-	if (!on) {
-		PKWR = 0;
-		return 0;
-	}
-
-	for (i = 0; i < ARRAY_SIZE(pxa27x_pkwr_gpio); i++) {
-
-		gpio = pxa27x_pkwr_gpio[i];
-
-		if (gpio_desc[gpio].config & MFP_LPM_CAN_WAKEUP)
-			mask |= gpio_desc[gpio].mask;
-	}
-
-	PKWR = mask;
-	return 0;
-}
-
 #define PWER_WEMUX2_GPIO38	(1 << 16)
 #define PWER_WEMUX2_GPIO53	(2 << 16)
 #define PWER_WEMUX2_GPIO40	(3 << 16)
@@ -273,6 +243,12 @@
 	gpio_desc[(gpio)].mux_mask = PWER_ ## mux ## _MASK;	\
 } while (0)
 
+
+static int pxa27x_pkwr_gpio[] = {
+	13, 16, 17, 34, 36, 37, 38, 39, 90, 91, 93, 94,
+	95, 96, 97, 98, 99, 100, 101, 102
+};
+
 static void __init pxa27x_mfp_init(void)
 {
 	int i, gpio;
@@ -291,7 +267,6 @@
 	for (i = 0; i < ARRAY_SIZE(pxa27x_pkwr_gpio); i++) {
 		gpio = pxa27x_pkwr_gpio[i];
 		gpio_desc[gpio].can_wakeup = 1;
-		gpio_desc[gpio].keypad_gpio = 1;
 		gpio_desc[gpio].mask = 1 << i;
 	}
 
--- a/arch/arm/mach-pxa/pxa27x.c	2009-09-10 00:13:59.000000000 +0200
+++ b/arch/arm/mach-pxa/pxa27x.c	2009-12-29 03:13:00.000000000 +0100
@@ -323,9 +323,6 @@
 	if (gpio >= 0 && gpio < 128)
 		return gpio_set_wake(gpio, on);
 
-	if (irq == IRQ_KEYPAD)
-		return keypad_set_wake(on);
-
 	switch (irq) {
 	case IRQ_RTCAlrm:
 		mask = PWER_RTC;

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2010-04-29 13:08 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-06  7:10 sharp c-3000 aka spitz: fix warn_on introduced in 2.6.32-rc1 Pavel Machek
2010-01-06  7:17 ` Eric Miao
2010-01-07  6:52   ` Pavel Machek
2010-01-07  7:33     ` Eric Miao
2010-01-23 19:41       ` Stanislav Brabec
2010-01-23 22:43         ` gpio_keys and how PXA27x sets gpio_set_wake() (was Re: sharp c-3000 aka spitz: fix warn_on introduced in 2.6.32-rc1) Stanislav Brabec
2010-01-26  3:58           ` Eric Miao
2010-01-26 10:13             ` Stanislav Brabec
2010-01-26 10:20               ` Eric Miao
2010-01-26 10:44                 ` Stanislav Brabec
2010-01-26 11:23                   ` Dmitry Eremin-Solenikov
2010-01-26 11:39                   ` Eric Miao
2010-01-26 12:50                     ` Stanislav Brabec
2010-03-05  9:23       ` sharp c-3000 aka spitz: fix warn_on introduced in 2.6.32-rc1 Pavel Machek
2010-03-08  5:35         ` Eric Miao
2010-04-29 13:08           ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).