All of lore.kernel.org
 help / color / mirror / Atom feed
From: "dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>
To: Anson Huang <anson.huang@nxp.com>
Cc: "shawnguo@kernel.org" <shawnguo@kernel.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"festevam@gmail.com" <festevam@gmail.com>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	dl-linux-imx <linux-imx@nxp.com>
Subject: Re: [PATCH 1/2] input: keyboard: imx: no need to control interrupt status in event check
Date: Wed, 3 Apr 2019 14:48:42 -0700	[thread overview]
Message-ID: <20190403214842.GD53104@dtor-ws> (raw)
In-Reply-To: <1553842562-8481-1-git-send-email-Anson.Huang@nxp.com>

Hi Anson,

On Fri, Mar 29, 2019 at 07:00:43AM +0000, Anson Huang wrote:
> There is no need to enable release interrupt and disable depress
> interrupt in event check, as a timer is setup for checking these
> events rather than interrupts.

But won't using release interrupt allow signalling key release earlier?

> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
>  drivers/input/keyboard/imx_keypad.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c
> index 539cb67..7e32c36 100644
> --- a/drivers/input/keyboard/imx_keypad.c
> +++ b/drivers/input/keyboard/imx_keypad.c
> @@ -276,11 +276,6 @@ static void imx_keypad_check_for_events(struct timer_list *t)
>  		reg_val = readw(keypad->mmio_base + KPSR);
>  		reg_val |= KBD_STAT_KPKR | KBD_STAT_KRSS;
>  		writew(reg_val, keypad->mmio_base + KPSR);
> -
> -		reg_val = readw(keypad->mmio_base + KPSR);
> -		reg_val |= KBD_STAT_KRIE;
> -		reg_val &= ~KBD_STAT_KDIE;
> -		writew(reg_val, keypad->mmio_base + KPSR);
>  	}
>  }
>  
> -- 
> 2.7.4
> 

Thanks.

-- 
Dmitry

WARNING: multiple messages have this Message-ID (diff)
From: "dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>
To: Anson Huang <anson.huang@nxp.com>
Cc: "shawnguo@kernel.org" <shawnguo@kernel.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	dl-linux-imx <linux-imx@nxp.com>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"festevam@gmail.com" <festevam@gmail.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/2] input: keyboard: imx: no need to control interrupt status in event check
Date: Wed, 3 Apr 2019 14:48:42 -0700	[thread overview]
Message-ID: <20190403214842.GD53104@dtor-ws> (raw)
In-Reply-To: <1553842562-8481-1-git-send-email-Anson.Huang@nxp.com>

Hi Anson,

On Fri, Mar 29, 2019 at 07:00:43AM +0000, Anson Huang wrote:
> There is no need to enable release interrupt and disable depress
> interrupt in event check, as a timer is setup for checking these
> events rather than interrupts.

But won't using release interrupt allow signalling key release earlier?

> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
>  drivers/input/keyboard/imx_keypad.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c
> index 539cb67..7e32c36 100644
> --- a/drivers/input/keyboard/imx_keypad.c
> +++ b/drivers/input/keyboard/imx_keypad.c
> @@ -276,11 +276,6 @@ static void imx_keypad_check_for_events(struct timer_list *t)
>  		reg_val = readw(keypad->mmio_base + KPSR);
>  		reg_val |= KBD_STAT_KPKR | KBD_STAT_KRSS;
>  		writew(reg_val, keypad->mmio_base + KPSR);
> -
> -		reg_val = readw(keypad->mmio_base + KPSR);
> -		reg_val |= KBD_STAT_KRIE;
> -		reg_val &= ~KBD_STAT_KDIE;
> -		writew(reg_val, keypad->mmio_base + KPSR);
>  	}
>  }
>  
> -- 
> 2.7.4
> 

Thanks.

-- 
Dmitry

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2019-04-03 21:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-29  7:00 [PATCH 1/2] input: keyboard: imx: no need to control interrupt status in event check Anson Huang
2019-03-29  7:00 ` Anson Huang
2019-03-29  7:00 ` Anson Huang
2019-03-29  7:00 ` [PATCH 2/2] input: keyboard: imx: make sure keyboard can always wake up system Anson Huang
2019-03-29  7:00   ` Anson Huang
2019-03-29  7:00   ` Anson Huang
2019-04-03 21:48 ` dmitry.torokhov [this message]
2019-04-03 21:48   ` [PATCH 1/2] input: keyboard: imx: no need to control interrupt status in event check dmitry.torokhov
2019-04-03 21:48   ` dmitry.torokhov
2019-04-04  1:29   ` Anson Huang
2019-04-04  1:29     ` Anson Huang
2019-04-04  1:29     ` Anson Huang

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=20190403214842.GD53104@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=anson.huang@nxp.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.