aboutsummaryrefslogtreecommitdiff
path: root/drivers/mfd/ucb1x00-ts.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-02 20:01:07 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-02 20:01:07 -0800
commit06f9a73ff9ef58a59af593c37020749816735789 (patch)
tree71dc2f9ced5fb58ccd4a2d148b707e1ec5e33c07 /drivers/mfd/ucb1x00-ts.c
parent25271d8c84dabd926bbf8727d2f6e90fcbce30b6 (diff)
parent4b57018dcd6418e18c08088c89f123da8a7bfc45 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: mfd: Avoid tps6586x burst writes mfd: Don't suspend WM8994 if the CODEC is not suspended mfd: Fix DaVinci voice codec device name mfd: Fix NULL pointer due to non-initialized ucb1x00-ts absinfo mfd: Fix ASIC3 build with GENERIC_HARDIRQS_NO_DEPRECATED
Diffstat (limited to 'drivers/mfd/ucb1x00-ts.c')
-rw-r--r--drivers/mfd/ucb1x00-ts.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/mfd/ucb1x00-ts.c b/drivers/mfd/ucb1x00-ts.c
index 000cb414a78..92b85e28a15 100644
--- a/drivers/mfd/ucb1x00-ts.c
+++ b/drivers/mfd/ucb1x00-ts.c
@@ -385,12 +385,18 @@ static int ucb1x00_ts_add(struct ucb1x00_dev *dev)
idev->close = ucb1x00_ts_close;
__set_bit(EV_ABS, idev->evbit);
- __set_bit(ABS_X, idev->absbit);
- __set_bit(ABS_Y, idev->absbit);
- __set_bit(ABS_PRESSURE, idev->absbit);
input_set_drvdata(idev, ts);
+ ucb1x00_adc_enable(ts->ucb);
+ ts->x_res = ucb1x00_ts_read_xres(ts);
+ ts->y_res = ucb1x00_ts_read_yres(ts);
+ ucb1x00_adc_disable(ts->ucb);
+
+ input_set_abs_params(idev, ABS_X, 0, ts->x_res, 0, 0);
+ input_set_abs_params(idev, ABS_Y, 0, ts->y_res, 0, 0);
+ input_set_abs_params(idev, ABS_PRESSURE, 0, 0, 0, 0);
+
err = input_register_device(idev);
if (err)
goto fail;