All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Dave.Wang" <dave.wang@emc.com.tw>
Cc: Linux-kernel@vger.kernel.org, Linux-input@vger.kernel.org,
	'Benjamin Tissoires' <benjamin.tissoires@redhat.com>,
	"'Josh.Chen'" <josh.chen@emc.com.tw>,
	jingle.wu@emc.com.tw, 'phoenix' <phoenix@emc.com.tw>
Subject: Re: [PATCH 1/6] Input: elantech - Add the pattern for firmware into elantech_device_info structure
Date: Sat, 7 Dec 2019 12:33:17 -0800	[thread overview]
Message-ID: <20191207203317.GS50317@dtor-ws> (raw)
In-Reply-To: <000101d5abdc$61acff60$2506fe20$@emc.com.tw>

Hi Dave,

On Fri, Dec 06, 2019 at 10:25:09AM +0800, Dave.Wang wrote:
> Add the conditional expression to distinguish different patterns regarding
> 0, 1, 2. Different pattern has its own location for device information.

Your patches came in as line-wrapped by your mailer. Could you try
resending with "git send-email" please?

And could you please also add Kai-Heng Feng
<kai.heng.feng@canonical.com> to the CC as they were looking at the
bunch of laptops with Elan parts.

Thanks!

> 
> Signed-off-by: Dave Wang <dave.wang@emc.com.tw>
> ---
>  drivers/input/mouse/elantech.c | 11 +++++++++++
> drivers/input/mouse/elantech.h |  1 +
>  2 files changed, 12 insertions(+)
> 
> diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
> index 2d8434b7b623..1f0d914acd78 100644
> --- a/drivers/input/mouse/elantech.c
> +++ b/drivers/input/mouse/elantech.c
> @@ -1557,6 +1557,17 @@ static int elantech_set_properties(struct
> elantech_device_info *info)
>  		}
>  	}
>  
> +	/* Get information pattern for hw_version 4 */
> +	if (ver == 15) {
> +		if ((info->fw_version & 0x0000ff) == 0x01)
> +			info->pattern = 0x01;
> +		else if ((info->fw_version & 0x0000ff) == 0x02)
> +			info->pattern = 0x02;
> +		else
> +			info->pattern = 0x00;
> +	} else
> +		info->pattern = 0x00;
> +
>  	/* decide which send_cmd we're gonna use early */
>  	info->send_cmd = info->hw_version >= 3 ? elantech_send_cmd :
>  						 synaptics_send_cmd;
> diff --git a/drivers/input/mouse/elantech.h b/drivers/input/mouse/elantech.h
> index e0a3e59d4f1b..0aae6a9de8f0 100644
> --- a/drivers/input/mouse/elantech.h
> +++ b/drivers/input/mouse/elantech.h
> @@ -140,6 +140,7 @@ struct elantech_device_info {
>  	unsigned char samples[3];
>  	unsigned char debug;
>  	unsigned char hw_version;
> +	unsigned char pattern;
>  	unsigned int fw_version;
>  	unsigned int x_min;
>  	unsigned int y_min;
> --
> 2.17.1
> 
> 

-- 
Dmitry

  reply	other threads:[~2019-12-07 20:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-06  2:25 [PATCH 1/6] Input: elantech - Add the pattern for firmware into elantech_device_info structure Dave.Wang
2019-12-07 20:33 ` Dmitry Torokhov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-12-06  2:17 Dave.Wang

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=20191207203317.GS50317@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=Linux-input@vger.kernel.org \
    --cc=Linux-kernel@vger.kernel.org \
    --cc=benjamin.tissoires@redhat.com \
    --cc=dave.wang@emc.com.tw \
    --cc=jingle.wu@emc.com.tw \
    --cc=josh.chen@emc.com.tw \
    --cc=phoenix@emc.com.tw \
    /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.