diff options
author | Ping Cheng <pinglinux@gmail.com> | 2013-07-28 09:38:54 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-08-13 07:31:12 +0200 |
commit | 401d7d108fc19595f6a7d7dd7d553458155e31fa (patch) | |
tree | 0f29d91e6ddebfef6b27eb25c2016d538c00b0d1 /drivers/input/tablet/wacom_wac.c | |
parent | Input: twl6040-vibra - remove support for legacy (pdata) mode (diff) | |
download | linux-401d7d108fc19595f6a7d7dd7d553458155e31fa.tar.xz linux-401d7d108fc19595f6a7d7dd7d553458155e31fa.zip |
Input: wacom - integrate resolution calculation
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Tested-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/input/tablet/wacom_wac.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 518282da6d85..541197b7b973 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c @@ -1443,13 +1443,6 @@ void wacom_setup_device_quirks(struct wacom_features *features) } } -static unsigned int wacom_calculate_touch_res(unsigned int logical_max, - unsigned int physical_max) -{ - /* Touch physical dimensions are in 100th of mm */ - return (logical_max * 100) / physical_max; -} - static void wacom_abs_set_axis(struct input_dev *input_dev, struct wacom_wac *wacom_wac) { @@ -1473,11 +1466,9 @@ static void wacom_abs_set_axis(struct input_dev *input_dev, input_set_abs_params(input_dev, ABS_Y, 0, features->y_max, features->y_fuzz, 0); input_abs_set_res(input_dev, ABS_X, - wacom_calculate_touch_res(features->x_max, - features->x_phy)); + features->x_resolution); input_abs_set_res(input_dev, ABS_Y, - wacom_calculate_touch_res(features->y_max, - features->y_phy)); + features->y_resolution); } if (features->touch_max > 1) { @@ -1486,11 +1477,9 @@ static void wacom_abs_set_axis(struct input_dev *input_dev, input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0, features->y_max, features->y_fuzz, 0); input_abs_set_res(input_dev, ABS_MT_POSITION_X, - wacom_calculate_touch_res(features->x_max, - features->x_phy)); + features->x_resolution); input_abs_set_res(input_dev, ABS_MT_POSITION_Y, - wacom_calculate_touch_res(features->y_max, - features->y_phy)); + features->y_resolution); } } } |