From patchwork Tue Oct 6 19:54:13 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Machek X-Patchwork-Id: 52341 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n97LAHG7005442 for ; Wed, 7 Oct 2009 21:10:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751004AbZJGVI3 (ORCPT ); Wed, 7 Oct 2009 17:08:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751398AbZJGVI3 (ORCPT ); Wed, 7 Oct 2009 17:08:29 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:35982 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750993AbZJGVI2 (ORCPT ); Wed, 7 Oct 2009 17:08:28 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id B46D4F0646; Wed, 7 Oct 2009 23:07:51 +0200 (CEST) Date: Tue, 6 Oct 2009 21:54:13 +0200 From: Pavel Machek To: dtor@mail.ru, dmitry.torokhov@gmail.com, linux-input@vger.kernel.org Cc: kernel list , Andrew Morton Subject: ads7846 touchscreen: fix pressure Message-ID: <20091006195413.GA1469@ucw.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org --- linux-rc/drivers/input.ofic/touchscreen/ads7846.c 2009-10-06 13:49:56.000000000 +0200 +++ linux-rc/drivers/input/touchscreen/ads7846.c 2009-10-06 21:18:25.000000000 +0200 @@ -608,12 +609,12 @@ input_report_abs(input, ABS_X, x); input_report_abs(input, ABS_Y, y); - input_report_abs(input, ABS_PRESSURE, Rt); + input_report_abs(input, ABS_PRESSURE, ts->pressure_max-Rt); input_sync(input); #ifdef VERBOSE dev_dbg(&ts->spi->dev, "%4d/%4d/%4d\n", x, y, Rt); #endif } hrtimer_start(&ts->timer, ktime_set(0, TS_POLL_PERIOD),