Em Dom, 2009-06-28 =C3=A0s 23:14 -0700, Dmitry Torokhov escreveu: > > drivers/input/keyboard/Kconfig | 7 ++ > > drivers/input/keyboard/Makefile | 1 + > > drivers/input/keyboard/pcap-keys.c | 152 ++++++++++++++++++++++++++++= ++++++++ > > 3 files changed, 160 insertions(+), 0 deletions(-) > >=20 >=20 > First of all I think the driver should live in misc, not in keyboard, > since it is not a full-fledged keyboard. Ok. > > + Say Y here if you want to use power key and jack events > > + on Motorola EZX 2nd generation phones > > + >=20 > To compile this driver as a module... Ok. > > + case PCAP-IRQ-MIC: > > + input-report-key(pcap-keys->input, KEY-HP, !pstat); >=20 > Why not SW-MICROPHONE-INSERT? Its actually a button. The device has a single jack for headphone and microphone. And the headset that we connect to it has a button that you use to answer calls, or dial. > > +static int > > + pcap-keys->input->phys =3D "pcap-keys/input0"; > > + pcap-keys->input->dev.parent =3D &pdev->dev; >=20 > I do like a temp for input-dev, it usually makes code a bit smaller. > Also it would be nice to have but type set (BUS-HOST I think). Ok. > > + set-bit(KEY-HP, pcap-keys->input->keybit); > Ok. > > + .remove =3D pcap-keys-remove, >=20 > >=20 > Do we need MODULE-ALIAS() here? Do we? I think we don't, but well... It costs nothing. ;)