All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wanlong Gao <gaowanlong@cn.fujitsu.com>
To: Zhang Jiejing <jiejing.zhang@freescale.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-input@vger.kernel.org, Henrik Rydberg <rydberg@euromail.se>,
	kzjeef@gmail.com
Subject: Re: [PATCH] input: add EETI eGalax I2C capacitive multi touch driver.
Date: Tue, 26 Jul 2011 17:47:58 +0800	[thread overview]
Message-ID: <4E2E8D4E.8070803@cn.fujitsu.com> (raw)
In-Reply-To: <1311672354-15453-1-git-send-email-jiejing.zhang@freescale.com>

On 07/26/2011 05:25 PM, Zhang Jiejing wrote:
> this patch adds EETI eGalax serial multi touch controller driver.
>
> EETI eGalax serial touch screen controller is a I2C based multiple
> capacitive touch screen controller, it can supports 5 touch events maximum.
>
> Signed-off-by: Zhang Jiejing<jiejing.zhang@freescale.com>
> ---
>   drivers/input/touchscreen/Kconfig     |   10 +
>   drivers/input/touchscreen/Makefile    |    1 +
>   drivers/input/touchscreen/egalax_ts.c |  314 +++++++++++++++++++++++++++++++++
>   3 files changed, 325 insertions(+), 0 deletions(-)
>   create mode 100644 drivers/input/touchscreen/egalax_ts.c
>

> +
> +	if (down) {
> +		/* since egalax only report one of multi touch event,
> +		 * so we need record pervious event with different id
> +		 * and report them.*/
> +		events[id].valid = valid;
> +		events[id].status = down;
> +		events[id].x = x;
> +		events[id].y = y;
> +
> +		for (i = 0; i<  MAX_SUPPORT_POINTS; i++) {
> +			if (!events[i].valid)
> +				continue;
> +			dev_dbg(&client->dev, "report id:%d valid:%d x:%d y:%d",
> +				i, valid, x, y);
> +
> +			input_report_abs(input_dev,
> +					 ABS_MT_TRACKING_ID, i);
> +			input_report_abs(input_dev,
> +					 ABS_MT_TOUCH_MAJOR, 1);
> +			input_report_abs(input_dev,
> +					 ABS_MT_POSITION_X, events[i].x);
> +			input_report_abs(input_dev,
> +					 ABS_MT_POSITION_Y, events[i].y);
> +			input_mt_sync(input_dev);
> +		}
> +	} else {
> +		dev_dbg(&client->dev, "release id:%d\n", id);
> +		events[id].valid = 0;
> +		events[id].status = 0;
> +		input_report_abs(input_dev, ABS_MT_TRACKING_ID, id);
> +		input_event(input_dev, EV_ABS, ABS_MT_TOUCH_MAJOR, 0);
> +		input_mt_sync(input_dev);
> +	}
> +
> +	input_sync(input_dev);
need re-sync here ?

> +	data->client = client;
> +	data->input_dev = input_dev;
> +	/* controller may be in sleep, wake it up. */
> +	egalax_wake_up_device(client);
> +	ret = egalax_firmware_version(client);
> +	if (ret<  0) {
> +		dev_err(&client->dev,
> +			"egalax_ts: failed to read firmware version\n");
> +		ret = -EIO;
> +		goto err_free_dev;
> +	}
> +
> +	input_dev->name = "EETI eGalax Touch Screen";
> +	input_dev->phys = "I2C",
> +	input_dev->id.bustype = BUS_I2C;
> +	input_dev->dev.parent =&client->dev;
> +
> +	__set_bit(EV_ABS, input_dev->evbit);
> +	__set_bit(EV_KEY, input_dev->evbit);
> +	__set_bit(BTN_TOUCH, input_dev->keybit);
> +	__set_bit(ABS_X, input_dev->absbit);
> +	__set_bit(ABS_Y, input_dev->absbit);
> +	input_set_abs_params(input_dev, ABS_X, 0, 32767, 0, 0);
> +	input_set_abs_params(input_dev, ABS_Y, 0, 32767, 0, 0);
make 32767 to macro here ?

-- 
Thanks
Best Regards
Wanlong Gao

  reply	other threads:[~2011-07-26  9:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-26  9:25 [PATCH] input: add EETI eGalax I2C capacitive multi touch driver Zhang Jiejing
2011-07-26  9:47 ` Wanlong Gao [this message]
2011-07-29  5:28   ` Jiejing.Zhang 
2011-07-29  6:00     ` Wanlong Gao
2011-08-01  6:34 ` Dmitry Torokhov
2011-08-02  8:49   ` Jiejing.Zhang 
2011-08-03 11:29   ` [PATCH v2] " Zhang Jiejing
2011-08-03 20:48     ` Chase Douglas
2011-08-04  0:19     ` Wanlong Gao
2011-08-11 20:34     ` Henrik Rydberg
2011-08-12 13:24       ` Jiejing.Zhang 
2011-08-12 20:30         ` Henrik Rydberg
2011-09-08 11:39           ` Jiejing.Zhang 
2011-09-08 11:40           ` [PATCH] " Zhang Jiejing
2011-09-13  9:15             ` Henrik Rydberg
2011-09-14  4:50               ` Jiejing.Zhang 
2011-09-14  4:57                 ` Dmitry Torokhov
2011-11-10 10:01                 ` [PATCH V3] " Zhang Jiejing
2011-11-10 18:38                   ` Dmitry Torokhov
2011-11-12  6:12                     ` [PATCH V4] " Zhang Jiejing
2011-11-12  8:02                       ` Dmitry Torokhov
2011-11-12  8:45                         ` Jiejing Zhang

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=4E2E8D4E.8070803@cn.fujitsu.com \
    --to=gaowanlong@cn.fujitsu.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jiejing.zhang@freescale.com \
    --cc=kzjeef@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=rydberg@euromail.se \
    /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.