Thread (6 messages) 6 messages, 2 authors, 2006-05-01

Re: [PATCH] via-pmu: report powerbutton as proper input event

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2006-05-01 06:58:42

On Fri, 2006-04-28 at 21:15 +0200, Johannes Berg wrote:
This patch adds an input device for the power button so that userspace gets
notified about the user pressing it via the standard input layer.
Looks interesting. Waht about other buttons/events the PMU can report ?
quoted hunk ↗ jump to hunk
+#endif /* __VIA_PMU_EVENT_H */
--- linux-2.6.orig/include/linux/input.h	2006-04-28 20:00:37.417288704 +0200
+++ linux-2.6/include/linux/input.h	2006-04-28 20:00:48.157288704 +0200
@@ -658,6 +658,7 @@ struct input_absinfo {
 #define BUS_I2C			0x18
 #define BUS_HOST		0x19
 #define BUS_GSC			0x1A
+#define BUS_PMU			0x20
Magic numbers... BAD BAD BAD ... Somebody needs to LART the input layer
people.
 
quoted hunk ↗ jump to hunk
@@ -2915,6 +2921,10 @@ static int __init init_pmu_led(void)
 		if (pmu_led_init()) {
 			printk(KERN_WARNING "via-pmu: LED failed to init\n");
 		}
+
+		/* only on keylargo can the power button be on the pmu ... */
+		if (pmu_event_init())
+			printk(KERN_WARNING "via-pmu: couldn't add event device");
 	}
 
 	return 0;
Do we need these here ? Why not an initcall self-contained in each
file ?

Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help