OSDN Git Service

Input: sun4i-ts - really fix A10 temperature reporting
authorHans de Goede <hdegoede@redhat.com>
Thu, 12 Mar 2015 21:50:36 +0000 (14:50 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 12 Mar 2015 21:53:10 +0000 (14:53 -0700)
commit877bef7de141db241e0c5d06db988b4ecbe29cf3
tree7bea020aa908e9b21378429f5e0937c26bdff80b
parentb6310affbe2bf14cbe6b6d28db48e1e37d52fbca
Input: sun4i-ts - really fix A10 temperature reporting

The commit titled: "Input: sun4i-ts -  A10 (sun4i) has a different
temperature curve" contains a math error, the offset it uses is in degrees,
but the actual code applies the offset before multiplying by stepsize :|

Given that this is rather backwards (every math course ever thought applies
the multiplication before the offset for linear functions), this commit
fixes things by changing the code applying the offset to do the logical
thing, adjusting the offset for the other models accordingly.

This has been tested on an A10, A13, A20 and A31 to make sure everything
really is correct now.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/sun4i-ts.c