public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Anisse Astier <anisse@astier.eu>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, linux-acpi@vger.kernel.org,
	Len Brown <lenb@kernel.org>,
	Carlos Corbacho <carlos@strangeworlds.co.uk>
Subject: Re: [RFC PATCH 1/2] Input: add msi-wmi driver to support hotkeys in MSI Windtop AE1900-WT
Date: Thu, 3 Dec 2009 10:08:12 +0100	[thread overview]
Message-ID: <20091203100812.73491fb1@destiny.ordissimo> (raw)
In-Reply-To: <20091203031128.GA9121@core.coreip.homeip.net>

On Wed, 2 Dec 2009 19:11:28 -0800, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote :

> Hi Anisse,
> 
> On Wed, Dec 02, 2009 at 07:26:03PM +0100, Anisse Astier wrote:
> > +
> > +	if (jiffies_to_msecs(get_jiffies_64() -
> > msi_wmi_time_last_press)
> > +			> pression_timeout) {
> 
> Why don't you use time_after() instead of manual computation?
> 
> Also, what is the point of this? If you are trying to debounce the
> buttons this will not quite work. To do debouncing properly you need
> to store the value you just read and fire up a timer. When timer
> fires - that's the stable value.

Indeed, the point is to debounce the keys. I guess I’ll just use the 
debounce mecanism in use in the gpio_keys driver.
But why use a timer instead of a delayed workqueue? Do we need the precison
of a timer for a simple debounce?

> > +		printk(KERN_DEBUG
> > +				"MSI WMI: event correctly
> > received: %llu\n",
> > +				obj->integer.value);
> 
> This is way too noisy for the mainline kernel, pr_debug() perhaps?
Sure.

> > +	msi_wmi_input_setup();
> 
> 
> You need to handle errors returned by msi_wmi_input_setup() as well.

Yes, I reworked the init in the second patch, I'll put the clean init in
the first one for v2.

> > +MODULE_PARM_DESC(pression_timeout,
> > +		 "How much time interrupts are ignored between
> > each pression");
> 
> This is not the best option name:
> 
> MODULE_PARM_DESC(debounce_interval,
> 		 "Controls how long driver will wait for button to
> debounce");
> 

Thanks a lot for your comments.

Regards,

Anisse
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-12-03  9:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-02 18:26 [RFC PATCH 1/2] Input: add msi-wmi driver to support hotkeys in MSI Windtop AE1900-WT Anisse Astier
2009-12-02 18:28 ` [RFC PATCH 2/2] Input: msi-wmi - switch to using sparse keymap library Anisse Astier
2009-12-02 18:48   ` Dmitry Torokhov
2009-12-03  3:11 ` [RFC PATCH 1/2] Input: add msi-wmi driver to support hotkeys in MSI Windtop AE1900-WT Dmitry Torokhov
2009-12-03  9:08   ` Anisse Astier [this message]
2009-12-03  9:34     ` Dmitry Torokhov
2009-12-03 16:49 ` Thomas Renninger
2009-12-04 10:15   ` Anisse Astier
2009-12-04 10:55     ` Thomas Renninger
2009-12-04 13:51       ` Anisse Astier
2009-12-04 15:20         ` Thomas Renninger
2009-12-04 15:35           ` Anisse Astier

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=20091203100812.73491fb1@destiny.ordissimo \
    --to=anisse@astier.eu \
    --cc=carlos@strangeworlds.co.uk \
    --cc=dmitry.torokhov@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    /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