linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Illia Smyrnov <illia.smyrnov@ti.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	balbi@ti.com, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH v2 3/3] Input: omap-keypad: Clear pending interrupts on open
Date: Tue, 23 Jul 2013 20:18:38 +0300	[thread overview]
Message-ID: <20130723171838.GA9166@radagast> (raw)
In-Reply-To: <1374595798-15492-4-git-send-email-illia.smyrnov@ti.com>

[-- Attachment #1: Type: text/plain, Size: 1347 bytes --]

Hi,

On Tue, Jul 23, 2013 at 07:09:58PM +0300, Illia Smyrnov wrote:
> Clear pending interrupts when open keypad.

where are these interrupts coming from ?

> Signed-off-by: Illia Smyrnov <illia.smyrnov@ti.com>
> ---
>  drivers/input/keyboard/omap4-keypad.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
> index b876a0d..62abc3e 100644
> --- a/drivers/input/keyboard/omap4-keypad.c
> +++ b/drivers/input/keyboard/omap4-keypad.c
> @@ -185,13 +185,14 @@ static int omap4_keypad_open(struct input_dev *input)
>  			(OMAP4_VAL_PVT << OMAP4_DEF_CTRL_PTV_SHIFT));
>  	kbd_writel(keypad_data, OMAP4_KBD_DEBOUNCINGTIME,
>  			OMAP4_VAL_DEBOUNCINGTIME);
> -	kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
> -			OMAP4_VAL_IRQDISABLE);
>  	kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE,
>  			OMAP4_DEF_IRQENABLE_EVENTEN |
>  				OMAP4_DEF_IRQENABLE_LONGKEY);
>  	kbd_writel(keypad_data, OMAP4_KBD_WAKEUPENABLE,
>  			OMAP4_DEF_WUP_EVENT_ENA | OMAP4_DEF_WUP_LONG_KEY_ENA);
> +	/* clear pending interrupts */
> +	kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
> +			 kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));

you might want to clear these interrupts before unmasking them :-)

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2013-07-23 17:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-23 16:09 [PATCH v2 0/3] Input: omap-keypad: Convert to threaded IRQ and cleanup Illia Smyrnov
2013-07-23 16:09 ` [PATCH v2 1/3] Input: omap-keypad: Cleanup - use bitfiled instead of hardcoded values Illia Smyrnov
2013-07-23 17:20   ` Felipe Balbi
2013-07-23 16:09 ` [PATCH v2 2/3] Input: omap-keypad: Convert to threaded IRQ Illia Smyrnov
2013-07-23 17:25   ` Felipe Balbi
2013-07-23 17:32     ` Felipe Balbi
2013-07-23 16:09 ` [PATCH v2 3/3] Input: omap-keypad: Clear pending interrupts on open Illia Smyrnov
2013-07-23 17:18   ` Felipe Balbi [this message]

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=20130723171838.GA9166@radagast \
    --to=balbi@ti.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=illia.smyrnov@ti.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@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;
as well as URLs for NNTP newsgroup(s).