- Previous thread: [PATCH] powerpc/perf_counter: POWER7 has alternate PR/HV bits
- Next thread: Approved Award Winner
- Threads sorted by date: kernel 200906
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 __init pcap_keys_probe(struct platform_device *pdev)
>=20
> __devinit, not __init should be used on driver's probe() methods.
Ok.
> > + pcap_keys->input->name =3D pdev->name;
> > + 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);
> __set_bit() please, like Trolok said.
Ok.
> > +static int pcap_keys_remove(struct platform_device *pdev)
>=20
> __devexit here.
Ok.
> > + .remove =3D pcap_keys_remove,
>=20
> __devexit_p()
Ok.
> > +MODULE_DESCRIPTION("Motorola PCAP2 input events driver");
> > +MODULE_AUTHOR("Ilya Petrov ");
> > +MODULE_LICENSE("GPL");
>=20
> Do we need MODULE_ALIAS() here?
Do we? I think we don't, but well... It costs nothing. ;)
--=20
Daniel Ribeiro
> > 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 __init pcap_keys_probe(struct platform_device *pdev)
>=20
> __devinit, not __init should be used on driver's probe() methods.
Ok.
> > + pcap_keys->input->name =3D pdev->name;
> > + 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);
> __set_bit() please, like Trolok said.
Ok.
> > +static int pcap_keys_remove(struct platform_device *pdev)
>=20
> __devexit here.
Ok.
> > + .remove =3D pcap_keys_remove,
>=20
> __devexit_p()
Ok.
> > +MODULE_DESCRIPTION("Motorola PCAP2 input events driver");
> > +MODULE_AUTHOR("Ilya Petrov ");
> > +MODULE_LICENSE("GPL");
>=20
> Do we need MODULE_ALIAS() here?
Do we? I think we don't, but well... It costs nothing. ;)
--=20
Daniel Ribeiro
Conversations: [PATCH] PCAP misc input driver (for 2.6.32)
- [PATCH] PCAP misc input driver (for 2.6.32) by Daniel Ribeiro on 2009-06-27T17:10:37+00:00
- Re: [PATCH] PCAP misc input driver (for 2.6.32) by Trilok Soni on 2009-06-28T07:19:52+00:00
- Re: [PATCH] PCAP misc input driver (for 2.6.32) by Daniel Ribeiro on 2009-06-28T17:53:30+00:00
- Re: [PATCH] PCAP misc input driver (for 2.6.32) by Dmitry Torokhov on 2009-06-29T06:22:21+00:00
- Re: [PATCH] PCAP misc input driver (for 2.6.32) by Mark Brown on 2009-06-29T09:47:24+00:00
- Re: [PATCH] PCAP misc input driver (for 2.6.32) by Ilya Petrov on 2009-06-29T16:27:58+00:00
- Re: [PATCH] PCAP misc input driver (for 2.6.32) by Mark Brown on 2009-06-29T16:33:44+00:00
- Re: [PATCH] PCAP misc input driver (for 2.6.32) by Daniel Ribeiro on 2009-06-29T20:47:41+00:00
Related Threads
- [ruby-core:21045] [Bug #965] make clean errors - 1.9.1 branch - ruby
- [GUMP@vmgump]: Project tomcat-jasper_tc6 (in module tomcat-jasper_tc6) failed - tomcat
- RE: getting dns error - postfix
- [users] Registration - openoffice
- Dara P Maginnis/IR/AIB is out of the office. - tomcat
- [lto][patch] Don't write DECL_CONTEXT that are non to be NULL - gcc
- How to use the type in the Mysql::Field object? - ruby
- FreeBSD ports which are currently marked forbidden - freebsd
- how can trace stored procedure usage? - mysql
- [Bug c/39013] New: Compiler miss to add @PLT to symbols when object is compile with -fPIE -pie - gcc