Input: wm831x-ts - default pressure measurements on
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 13 Mar 2011 04:48:34 +0000 (20:48 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 13 Mar 2011 04:49:07 +0000 (20:49 -0800)
tslib expects pressure measurements so enable them by default for better
compatibility.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/touchscreen/wm831x-ts.c

index 1022f715d3c25124479d16190da0aa89e861717e..3db0c29f3b0542abaf0ad77e8518f7c1763033cf 100644 (file)
@@ -225,7 +225,10 @@ static __devinit int wm831x_ts_probe(struct platform_device *pdev)
        else
                wm831x_ts->pd_irq = platform_get_irq_byname(pdev, "TCHPD");
 
-       wm831x_ts->pressure = pdata && pdata->pressure;
+       if (pdata)
+               wm831x_ts->pressure = pdata->pressure;
+       else
+               wm831x_ts->pressure = true;
 
        /* Five wire touchscreens can't report pressure */
        if (pdata && pdata->fivewire) {