]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - drivers/hid/wacom_sys.c
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)
commit115d5e12a7d5fe62076f9dcc728905196162d709
treef1eafc31bac96610ee6f279ffd66173cfa51c426
parent9d336daf3b502f594ce18d26a3a009adb2cf3729
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