public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: duson <dusonlin@emc.com.tw>
Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: [PATCH] Input: elan_i2c - Add hover event for ST format
Date: Mon, 29 Jun 2015 12:44:54 -0700	[thread overview]
Message-ID: <20150629194454.GE22166@dtor-ws> (raw)
In-Reply-To: <C24448D4-9078-4EE9-8E40-A2C8DC6115A6@emc.com.tw>

Hi Duson,

On Mon, Jun 29, 2015 at 09:19:09AM +0800, duson wrote:
> Signed-off by: Duson Lin <dusonlin@emc.com.tw>
> ---
>  drivers/input/mouse/elan_i2c_core.c |    2 ++

I'd rather we teach input_mt_init_slots() and
input_mt_report_pointer_emulation() do that for us.

Thanks.

>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c
> index 62641f2..ce97e28 100644
> --- a/drivers/input/mouse/elan_i2c_core.c
> +++ b/drivers/input/mouse/elan_i2c_core.c
> @@ -847,6 +847,7 @@ static void elan_report_absolute(struct elan_tp_data *data, u8 *packet)
>  	}
>  
>  	input_report_key(input, BTN_LEFT, tp_info & 0x01);
> +	input_report_abs(input, ABS_DISTANCE, hover_event != 0);
>  	input_mt_report_pointer_emulation(input, true);
>  	input_sync(input);
>  }
> @@ -922,6 +923,7 @@ static int elan_setup_input_device(struct elan_tp_data *data)
>  	input_abs_set_res(input, ABS_Y, data->y_res);
>  	input_set_abs_params(input, ABS_PRESSURE, 0, ETP_MAX_PRESSURE, 0, 0);
>  	input_set_abs_params(input, ABS_TOOL_WIDTH, 0, ETP_FINGER_WIDTH, 0, 0);
> +	input_set_abs_params(input, ABS_DISTANCE, 0, 1, 0, 0);
>  
>  	/* And MT parameters */
>  	input_set_abs_params(input, ABS_MT_POSITION_X, 0, data->max_x, 0, 0);
> 
> 
> 
> 

-- 
Dmitry

      reply	other threads:[~2015-06-29 19:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-29  1:19 [PATCH] Input: elan_i2c - Add hover event for ST format duson
2015-06-29 19:44 ` 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=20150629194454.GE22166@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=dusonlin@emc.com.tw \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@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