From: Daniel Ribeiro <drwyrm@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org,
inux-kernel <linux-kernel@vger.kernel.org>,
openezx-devel <openezx-devel@lists.openezx.org>,
Samuel Ortiz <sameo@linux.intel.com>,
Ilya Petrov <ilya.muromec@gmail.com>
Subject: Re: [PATCH] PCAP misc input driver (for 2.6.32)
Date: Mon, 29 Jun 2009 17:47:07 -0300 [thread overview]
Message-ID: <1246308427.18231.43.camel@brutus> (raw)
In-Reply-To: <20090629061434.GD12821@dtor-d630.eng.vmware.com>
[-- Attachment #1: Type: text/plain, Size: 1924 bytes --]
Em Dom, 2009-06-28 às 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(-)
> >
>
> 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
> > +
>
> To compile this driver as a module...
Ok.
> > + case PCAP_IRQ_MIC:
> > + input_report_key(pcap_keys->input, KEY_HP, !pstat);
>
> 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)
>
> __devinit, not __init should be used on driver's probe() methods.
Ok.
> > + pcap_keys->input->name = pdev->name;
> > + pcap_keys->input->phys = "pcap-keys/input0";
> > + pcap_keys->input->dev.parent = &pdev->dev;
>
> 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)
>
> __devexit here.
Ok.
> > + .remove = pcap_keys_remove,
>
> __devexit_p()
Ok.
> > +MODULE_DESCRIPTION("Motorola PCAP2 input events driver");
> > +MODULE_AUTHOR("Ilya Petrov <ilya.muromec@gmail.com>");
> > +MODULE_LICENSE("GPL");
>
> Do we need MODULE_ALIAS() here?
Do we? I think we don't, but well... It costs nothing. ;)
--
Daniel Ribeiro
[-- Attachment #2: Esta é uma parte de mensagem assinada digitalmente --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2009-06-29 20:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-27 17:09 [PATCH] PCAP misc input driver (for 2.6.32) Daniel Ribeiro
2009-06-28 7:19 ` Trilok Soni
2009-06-28 17:52 ` Daniel Ribeiro
2009-06-29 6:14 ` Dmitry Torokhov
2009-06-29 20:47 ` Daniel Ribeiro [this message]
2009-06-29 9:46 ` Mark Brown
2009-06-29 16:27 ` Ilya Petrov
2009-06-29 16:33 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1246308427.18231.43.camel@brutus \
--to=drwyrm@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=ilya.muromec@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=openezx-devel@lists.openezx.org \
--cc=sameo@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).