linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kamal Mostafa <kamal@canonical.com>
To: Joseph Salisbury <joseph.salisbury@canonical.com>
Cc: linux-kernel@vger.kernel.org, dmitry.torokhov@gmail.com,
	rydberg@euromail.se, dudl@cypress.com, git@status.e4ward.com,
	tim.gardner@canonical.com, linux-input@vger.kernel.org
Subject: Re: [PATCH 1/1] Input: cypress_ps2 - Return zero finger count if palm is detected.
Date: Mon, 30 Sep 2013 13:12:02 -0700	[thread overview]
Message-ID: <1380571922.15513.29.camel@fourier> (raw)
In-Reply-To: <007c09ae4ef7f72ffb657de0fb3854fcbc6d88f0.1379968154.git.joseph.salisbury@canonical.com>

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

On Tue, 2013-09-24 at 11:44 -0400, Joseph Salisbury wrote:
> BugLink: http://bugs.launchpad.net/bugs/1229361
> 
> This patch sets the finger count to 0 in the case of palm contact.
> 
> Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> (maintainer:INPUT (KEYBOARD,...,commit_signer:2/2=100%)
> Cc: Henrik Rydberg <rydberg@euromail.se> (maintainer:INPUT MULTITOUCH...)
> Cc: Kamal Mostafa <kamal@canonical.com> (commit_signer:2/2=100%)
> Cc: Dudley Du <dudl@cypress.com> (commit_signer:2/2=100%)
> Cc: Kyle Fazzari <git@status.e4ward.com> (commit_signer:1/2=50%)
> Cc: Tim Gardner <tim.gardner@canonical.com> (commit_signer:1/2=50%)
> Cc: linux-input@vger.kernel.org (open list:INPUT (KEYBOARD,...)
> Cc: linux-kernel@vger.kernel.org (open list)
> Cc: stable@vger.kernel.org

This patch works fine: eliminates stream of junk driver messages with no
ill effects.

Tested-by: Kamal Mostafa <kamal@canonical.com>

 -Kamal


> ---
>  drivers/input/mouse/cypress_ps2.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/input/mouse/cypress_ps2.c b/drivers/input/mouse/cypress_ps2.c
> index 45b3eda..95b2c40 100644
> --- a/drivers/input/mouse/cypress_ps2.c
> +++ b/drivers/input/mouse/cypress_ps2.c
> @@ -441,7 +441,7 @@ static int cypress_get_finger_count(unsigned char header_byte)
>  			case 2: return 5;
>  			default:
>  				/* Invalid contact (e.g. palm). Ignore it. */
> -				return -1;
> +				return 0;
>  		}
>  	}
>  
> @@ -460,7 +460,7 @@ static int cypress_parse_packet(struct psmouse *psmouse,
>  
>  	contact_cnt = cypress_get_finger_count(header_byte);
>  
> -	if (contact_cnt < 0) /* e.g. palm detect */
> +	if (contact_cnt < 0)
>  		return -EINVAL;
>  
>  	report_data->contact_cnt = contact_cnt;


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-09-30 20:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1379968154.git.joseph.salisbury@canonical.com>
2013-09-24 15:44 ` [PATCH 1/1] Input: cypress_ps2 - Return zero finger count if palm is detected Joseph Salisbury
2013-09-30 20:12   ` Kamal Mostafa [this message]
2013-10-11 16:30     ` [PATCH 1/1][Resend] " Joseph Salisbury
2013-10-16 18:35       ` Dmitry Torokhov

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=1380571922.15513.29.camel@fourier \
    --to=kamal@canonical.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dudl@cypress.com \
    --cc=git@status.e4ward.com \
    --cc=joseph.salisbury@canonical.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rydberg@euromail.se \
    --cc=tim.gardner@canonical.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).