Skip to content

Commit

Permalink
ENGR00243289 egalax_ts: Add support for single-touch
Browse files Browse the repository at this point in the history
Add support for single-touch for the Egalax Touch driver

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@freescale.com>
  • Loading branch information
ericnelsonaz authored and LiuHui-Jason committed Apr 3, 2013
1 parent a9b6868 commit 355f972
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
10 changes: 10 additions & 0 deletions drivers/input/touchscreen/Kconfig
Expand Up @@ -199,6 +199,16 @@ config TOUCHSCREEN_ELAN
To compile this driver as a module, choose M here: the
module will be called elan-touch.

config TOUCHSCREEN_EGALAX_SINGLE_TOUCH
bool "EETI eGalax touchscreen as single-touch"
default N
depends on TOUCHSCREEN_EGALAX
help
If you say yes here you get single-touch touchscreen support
on the eGalax I2C controller.
If you say "no", you'll get the normal multi-touch.


config TOUCHSCREEN_FUJITSU
tristate "Fujitsu serial touchscreen"
select SERIO
Expand Down
7 changes: 4 additions & 3 deletions drivers/input/touchscreen/egalax_ts.c
Expand Up @@ -139,7 +139,7 @@ static irqreturn_t egalax_ts_interrupt(int irq, void *dev_id)
events[id].x = x;
events[id].y = y;

#ifdef FORCE_SINGLE_POINTER_SUPPORT
#ifdef CONFIG_TOUCHSCREEN_EGALAX_SINGLE_TOUCH
input_report_abs(input_dev, ABS_X, x);
input_report_abs(input_dev, ABS_Y, y);
input_event(data->input_dev, EV_KEY, BTN_TOUCH, 1);
Expand All @@ -166,7 +166,7 @@ static irqreturn_t egalax_ts_interrupt(int irq, void *dev_id)
dev_dbg(&client->dev, "release id:%d\n", id);
events[id].valid = 0;
events[id].status = 0;
#ifdef FORCE_SINGLE_POINTER_SUPPORT
#ifdef CONFIG_TOUCHSCREEN_EGALAX_SINGLE_TOUCH
input_report_key(input_dev, BTN_TOUCH, 0);
input_report_abs(input_dev, ABS_PRESSURE, 0);
#else
Expand Down Expand Up @@ -256,8 +256,9 @@ static int __devinit egalax_ts_probe(struct i2c_client *client,
__set_bit(ABS_PRESSURE, 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);
input_set_abs_params(input_dev, ABS_PRESSURE, 0, 1, 0, 0);

#ifndef FORCE_SINGLE_POINTER_SUPPORT
#ifndef CONFIG_TOUCHSCREEN_EGALAX_SINGLE_TOUCH
input_set_abs_params(input_dev, ABS_MT_POSITION_X, 0, 32767, 0, 0);
input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0, 32767, 0, 0);
input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
Expand Down

0 comments on commit 355f972

Please sign in to comment.