summaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2017-07-02 16:34:14 +0200
committerJiri Kosina <jkosina@suse.cz>2017-07-20 16:01:10 +0200
commitb61d43e6b0637bb2ec456cc50be823343b8ad1f8 (patch)
treeeb084d5d9c1b8bbd3dca3b979bfbb74bf1a3d61a /drivers/hid
parent25cc2611a6d3f3f7c2ce4006fcc6c729a5ad8e14 (diff)
downloadop-kernel-dev-b61d43e6b0637bb2ec456cc50be823343b8ad1f8.zip
op-kernel-dev-b61d43e6b0637bb2ec456cc50be823343b8ad1f8.tar.gz
HID: asus: Add T100TA touchpad resolution info
The touchpad code is only used with the T100TA touchpad which measures 75.5 x 41.5 mm, add corresponding resolution info. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-asus.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index b759485..b2501b6 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c
@@ -86,6 +86,8 @@ struct asus_kbd_leds {
struct asus_touchpad_info {
int max_x;
int max_y;
+ int res_x;
+ int res_y;
int contact_size;
int max_contacts;
};
@@ -108,6 +110,8 @@ static const struct asus_touchpad_info asus_i2c_tp = {
static const struct asus_touchpad_info asus_t100ta_tp = {
.max_x = 2240,
.max_y = 1120,
+ .res_x = 30, /* units/mm */
+ .res_y = 27, /* units/mm */
.contact_size = 5,
.max_contacts = 5,
};
@@ -361,6 +365,8 @@ static int asus_input_configured(struct hid_device *hdev, struct hid_input *hi)
drvdata->tp->max_x, 0, 0);
input_set_abs_params(input, ABS_MT_POSITION_Y, 0,
drvdata->tp->max_y, 0, 0);
+ input_abs_set_res(input, ABS_MT_POSITION_X, drvdata->tp->res_x);
+ input_abs_set_res(input, ABS_MT_POSITION_Y, drvdata->tp->res_y);
input_set_abs_params(input, ABS_TOOL_WIDTH, 0, MAX_TOUCH_MAJOR, 0, 0);
input_set_abs_params(input, ABS_MT_TOUCH_MAJOR, 0, MAX_TOUCH_MAJOR, 0, 0);
input_set_abs_params(input, ABS_MT_PRESSURE, 0, MAX_PRESSURE, 0, 0);
OpenPOWER on IntegriCloud