Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263261
b: refs/heads/master
c: 28ac293
h: refs/heads/master
i:
  263259: 826b4d8
v: v3
  • Loading branch information
Yufeng Shen authored and Dmitry Torokhov committed Aug 17, 2011
1 parent 872717d commit 507bc31
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c331eb580a0a7906c0cdb8dbae3cfe99e3c0e555
refs/heads/master: 28ac293363368650963ee4c1e323c1ff502c121f
12 changes: 12 additions & 0 deletions trunk/drivers/input/touchscreen/atmel_mxt_ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ struct mxt_finger {
int x;
int y;
int area;
int pressure;
};

/* Each client has this additional data */
Expand Down Expand Up @@ -536,6 +537,8 @@ static void mxt_input_report(struct mxt_data *data, int single_id)
finger[id].x);
input_report_abs(input_dev, ABS_MT_POSITION_Y,
finger[id].y);
input_report_abs(input_dev, ABS_MT_PRESSURE,
finger[id].pressure);
} else {
finger[id].status = 0;
}
Expand All @@ -546,6 +549,8 @@ static void mxt_input_report(struct mxt_data *data, int single_id)
if (status != MXT_RELEASE) {
input_report_abs(input_dev, ABS_X, finger[single_id].x);
input_report_abs(input_dev, ABS_Y, finger[single_id].y);
input_report_abs(input_dev,
ABS_PRESSURE, finger[single_id].pressure);
}

input_sync(input_dev);
Expand All @@ -560,6 +565,7 @@ static void mxt_input_touchevent(struct mxt_data *data,
int x;
int y;
int area;
int pressure;

/* Check the touch is present on the screen */
if (!(status & MXT_DETECT)) {
Expand All @@ -584,6 +590,7 @@ static void mxt_input_touchevent(struct mxt_data *data,
y = y >> 2;

area = message->message[4];
pressure = message->message[5];

dev_dbg(dev, "[%d] %s x: %d, y: %d, area: %d\n", id,
status & MXT_MOVE ? "moved" : "pressed",
Expand All @@ -594,6 +601,7 @@ static void mxt_input_touchevent(struct mxt_data *data,
finger[id].x = x;
finger[id].y = y;
finger[id].area = area;
finger[id].pressure = pressure;

mxt_input_report(data, id);
}
Expand Down Expand Up @@ -1116,6 +1124,8 @@ static int __devinit mxt_probe(struct i2c_client *client,
0, data->max_x, 0, 0);
input_set_abs_params(input_dev, ABS_Y,
0, data->max_y, 0, 0);
input_set_abs_params(input_dev, ABS_PRESSURE,
0, 255, 0, 0);

/* For multi touch */
input_mt_init_slots(input_dev, MXT_MAX_FINGER);
Expand All @@ -1125,6 +1135,8 @@ static int __devinit mxt_probe(struct i2c_client *client,
0, data->max_x, 0, 0);
input_set_abs_params(input_dev, ABS_MT_POSITION_Y,
0, data->max_y, 0, 0);
input_set_abs_params(input_dev, ABS_MT_PRESSURE,
0, 255, 0, 0);

input_set_drvdata(input_dev, data);
i2c_set_clientdata(client, data);
Expand Down

0 comments on commit 507bc31

Please sign in to comment.