[PATCH] via-pmu: report powerbutton as proper input event
Benjamin Herrenschmidt
benh at kernel.crashing.org
Mon May 1 16:58:36 EST 2006
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 ?
> +#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.
> @@ -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.
More information about the Linuxppc-dev
mailing list