]> git.baikalelectronics.ru Git - kernel.git/commit
Input: wacom - introduce wacom_fix_phy_from_hid
authorJason Gerecke <killertofu@gmail.com>
Thu, 4 Oct 2012 00:24:32 +0000 (17:24 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 5 Oct 2012 06:09:31 +0000 (23:09 -0700)
commite231d8179f1c7149fa9db4b91d04beeb43d04e97
treef1eafc31bac96610ee6f279ffd66173cfa51c426
parent816a5cddce5f004344251e523ca05c55bb8341d6
Input: wacom - introduce wacom_fix_phy_from_hid

The Cintiq 24HD touch cannot use wacom_set_phy_from_res to determine
the physical size of the touch sensor since the pen and touch are
on separate USB devices. The physical size is, however, provided in
the HID descriptor, just scaled to a unit we don't use.

This patch introduces the function wacom_fix_phy_from_hid to let
us make use of the unit and exponent data provided by HID to set
the [xy]_phy variables to an appropriate value. This function
relies on a trimmed-down version of hidinput_calc_abs_res from
the hid-input.c.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Tested-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/tablet/wacom_sys.c