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

Johannes Berg johannes at sipsolutions.net
Mon May 1 18:56:13 EST 2006


On Mon, 2006-05-01 at 16:58 +1000, Benjamin Herrenschmidt wrote:
> 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 ?

What else does it report? As far as I know it doesn't have anything
else, at least on my system.

> > +#define BUS_PMU			0x20
> 
> Magic numbers... BAD BAD BAD ... Somebody needs to LART the input layer
> people.

It's not really a "magic" number since it doesn't really carry any
information, or would you like string identifiers in each device
descriptor? An enum would be just the same, in fact, the definition
could be rewritten as an enum :)

> Do we need these here ? Why not an initcall self-contained in each
> file ?

No heh, good point.

Thanks,
johannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 793 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20060501/57dd4c77/attachment.pgp>


More information about the Linuxppc-dev mailing list