linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Kamal Mostafa <kamal@canonical.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Henrik Rydberg <rydberg@euromail.se>,
	Dudley Du <dudl@cypress.com>, David Solda <dso@cypress.com>,
	Troy Abercrombia <ta@cypress.com>,
	Kyle Fazzari <git@status.e4ward.com>,
	Mario Limonciello <mario_limonciello@dell.com>,
	Tim Gardner <tim.gardner@canonical.com>,
	Herton Krzesinski <herton.krzesinski@canonical.com>
Subject: Re: [PATCH v5 3/3] input: Cypress PS/2 Trackpad link into psmouse-base
Date: Wed, 5 Dec 2012 23:52:54 -0800	[thread overview]
Message-ID: <20121206075254.GB25921@core.coreip.homeip.net> (raw)
In-Reply-To: <1354752976-27257-4-git-send-email-kamal@canonical.com>

Hi Kamal,

On Wed, Dec 05, 2012 at 04:16:16PM -0800, Kamal Mostafa wrote:
> From: Dudley Du <dudl@cypress.com>
> 
> Original code contributed by Dudley Du (Cypress Semiconductor Corporation),
> modified by Kamal Mostafa.
> 
> BugLink: http://launchpad.net/bugs/978807

Please fold it into the cypress_ps2 patch, they do not make sense
without each other.


> 
> Signed-off-by: Dudley Du <dudl@cypress.com>
> Signed-off-by: Kamal Mostafa <kamal@canonical.com>
> Signed-off-by: Mario Limonciello <mario_limonciello@dell.com>
> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
> ---
>  drivers/input/mouse/Kconfig        |   10 ++++++++++
>  drivers/input/mouse/Makefile       |    1 +
>  drivers/input/mouse/psmouse-base.c |   32 ++++++++++++++++++++++++++++++++
>  drivers/input/mouse/psmouse.h      |    1 +
>  4 files changed, 44 insertions(+)
> 
> diff --git a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig
> index cd6268c..88954dd 100644
> --- a/drivers/input/mouse/Kconfig
> +++ b/drivers/input/mouse/Kconfig
> @@ -68,6 +68,16 @@ config MOUSE_PS2_SYNAPTICS
>  
>  	  If unsure, say Y.
>  
> +config MOUSE_PS2_CYPRESS
> +       bool "Cypress PS/2 mouse protocol extension" if EXPERT
> +       default y
> +       depends on MOUSE_PS2
> +       help
> +         Say Y here if you have a Cypress PS/2 Trackpad connected to
> +         your system.
> +
> +         If unsure, say Y.
> +
>  config MOUSE_PS2_LIFEBOOK
>  	bool "Fujitsu Lifebook PS/2 mouse protocol extension" if EXPERT
>  	default y
> diff --git a/drivers/input/mouse/Makefile b/drivers/input/mouse/Makefile
> index 46ba755..323e352 100644
> --- a/drivers/input/mouse/Makefile
> +++ b/drivers/input/mouse/Makefile
> @@ -32,3 +32,4 @@ psmouse-$(CONFIG_MOUSE_PS2_LIFEBOOK)	+= lifebook.o
>  psmouse-$(CONFIG_MOUSE_PS2_SENTELIC)	+= sentelic.o
>  psmouse-$(CONFIG_MOUSE_PS2_TRACKPOINT)	+= trackpoint.o
>  psmouse-$(CONFIG_MOUSE_PS2_TOUCHKIT)	+= touchkit_ps2.o
> +psmouse-$(CONFIG_MOUSE_PS2_CYPRESS)	+= cypress_ps2.o
> diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
> index 22fe254..cff065f 100644
> --- a/drivers/input/mouse/psmouse-base.c
> +++ b/drivers/input/mouse/psmouse-base.c
> @@ -34,6 +34,7 @@
>  #include "touchkit_ps2.h"
>  #include "elantech.h"
>  #include "sentelic.h"
> +#include "cypress_ps2.h"
>  
>  #define DRIVER_DESC	"PS/2 mouse driver"
>  
> @@ -759,6 +760,28 @@ static int psmouse_extensions(struct psmouse *psmouse,
>  	}
>  
>  /*
> + * Try Cypress Trackpad.
> + * Must try it before Finger Sensing Pad because Finger Sensing Pad probe
> + * upsets some modules of Cypress Trackpads.
> + */
> +	if (max_proto > PSMOUSE_IMEX &&
> +			cypress_detect(psmouse, set_properties) == 0) {
> +		if (cypress_supported()) {
> +			if (cypress_init(psmouse) == 0)
> +				return PSMOUSE_CYPRESS;
> +
> +			/*
> +			 * Finger Sensing Pad probe upsets some modules of
> +			 * Cypress Trackpad, must avoid Finger Sensing Pad
> +			 * probe if Cypress Trackpad device detected.
> +			 */
> +			return PSMOUSE_PS2;
> +		}
> +
> +		max_proto = PSMOUSE_IMEX;
> +	}
> +
> +/*
>   * Try ALPS TouchPad
>   */
>  	if (max_proto > PSMOUSE_IMEX) {
> @@ -896,6 +919,15 @@ static const struct psmouse_protocol psmouse_protocols[] = {
>  		.alias		= "thinkps",
>  		.detect		= thinking_detect,
>  	},
> +#ifdef CONFIG_MOUSE_PS2_CYPRESS
> +	{
> +		.type		= PSMOUSE_CYPRESS,
> +		.name		= "CyPS/2",
> +		.alias		= "cypress",
> +		.detect		= cypress_detect,
> +		.init		= cypress_init,
> +	},
> +#endif
>  	{
>  		.type		= PSMOUSE_GENPS,
>  		.name		= "GenPS/2",
> diff --git a/drivers/input/mouse/psmouse.h b/drivers/input/mouse/psmouse.h
> index fe1df23..2f0b39d 100644
> --- a/drivers/input/mouse/psmouse.h
> +++ b/drivers/input/mouse/psmouse.h
> @@ -95,6 +95,7 @@ enum psmouse_type {
>  	PSMOUSE_ELANTECH,
>  	PSMOUSE_FSP,
>  	PSMOUSE_SYNAPTICS_RELATIVE,
> +	PSMOUSE_CYPRESS,
>  	PSMOUSE_AUTO		/* This one should always be last */
>  };
>  
> -- 
> 1.7.10.4
> 

-- 
Dmitry

      reply	other threads:[~2012-12-06  7:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-06  0:16 [PATCH v5 0/3] Cypress PS/2 Trackpad driver Kamal Mostafa
2012-12-06  0:16 ` [PATCH v5 1/3] input: increase struct ps2dev cmdbuf[] to 8 bytes Kamal Mostafa
2012-12-06  7:51   ` Dmitry Torokhov
2012-12-06  0:16 ` [PATCH v5 2/3] input: Cypress PS/2 Trackpad psmouse driver Kamal Mostafa
2012-12-06  8:08   ` Dmitry Torokhov
2012-12-07  2:09     ` Kamal Mostafa
2012-12-06  0:16 ` [PATCH v5 3/3] input: Cypress PS/2 Trackpad link into psmouse-base Kamal Mostafa
2012-12-06  7:52   ` Dmitry Torokhov [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=20121206075254.GB25921@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=dso@cypress.com \
    --cc=dudl@cypress.com \
    --cc=git@status.e4ward.com \
    --cc=herton.krzesinski@canonical.com \
    --cc=kamal@canonical.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario_limonciello@dell.com \
    --cc=rydberg@euromail.se \
    --cc=ta@cypress.com \
    --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).