From patchwork Fri Jun 24 02:15:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu DaoGuang X-Patchwork-Id: 915252 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5O2GrCI019303 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 24 Jun 2011 02:17:15 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QZvwa-0005ZN-6l; Fri, 24 Jun 2011 02:16:28 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QZvwZ-0000Yd-Qz; Fri, 24 Jun 2011 02:16:27 +0000 Received: from mail-iy0-f177.google.com ([209.85.210.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QZvwW-0000YK-NK for linux-arm-kernel@lists.infradead.org; Fri, 24 Jun 2011 02:16:25 +0000 Received: by iyn15 with SMTP id 15so2487053iyn.36 for ; Thu, 23 Jun 2011 19:16:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=GgESDAwl3RdTdrpL2Ym9n3xN9pBs2V3cqDGt/PA/KYQ=; b=pQPK44/xshcLiduYumYuBdk0bfzNYSTFNdeH66jgF5pl3V9wa6ZMXGIxaK7RqANupT OLDqNopckrFnCWUoI0dR4Uldt2ivxN2bcMZPSXYEMy8S35Ha8EfCYTo7wZSdQ8eqvevE eSOynDKyMATr7CjLDa+RFcjMMHS97BtWJBWKM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=cbOS+femqEtDCWpB6aCyZcSZWlNUGxho0zOvjKOxRStTt1YBmycQSGtoVGXjWfqUzJ +/qUIR254630JnduyUnw5FePKsQHKg9Kaxb0hNc9FQBMRLdhj2+ROXTKQCQY5f4YvfmA 4X3wwDwjM2+SZUZkJzUOrJLVY2qpm5VxtJyP4= Received: by 10.42.163.74 with SMTP id b10mr2139650icy.148.1308881780864; Thu, 23 Jun 2011 19:16:20 -0700 (PDT) Received: from localhost.localdomain ([125.77.254.122]) by mx.google.com with ESMTPS id s2sm1206422ibe.52.2011.06.23.19.16.03 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 23 Jun 2011 19:16:19 -0700 (PDT) From: Wu DaoGuang To: ben-linux@fluff.org, kgene.kim@samsung.com, dmitry.torokhov@gmail.com Subject: [PATCH] INPUT:Add ABS_PRESSURE input event support for touchscreen driver Date: Fri, 24 Jun 2011 10:15:38 +0800 Message-Id: <1308881738-6392-1-git-send-email-wdgvip@gmail.com> X-Mailer: git-send-email 1.7.1 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110623_221625_063888_158C0E35 X-CRM114-Status: GOOD ( 12.89 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.210.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is freemail (wdgvip[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 RFC_ABUSE_POST Both abuse and postmaster missing on sender domain 0.0 T_TO_NO_BRKTS_FREEMAIL T_TO_NO_BRKTS_FREEMAIL Cc: Wu DaoGuang , wdgvip@gamil.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-input@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 24 Jun 2011 02:17:15 +0000 (UTC) The touchscreen driver s3c2410_ts.c doesn't work well when using the tslib, an abstraction layer for touchscreen panel events. Tslib needs ABS_X ABS_Y and ABS_PRESSURE events to report, but only the former two the driver can provide. So this patch fixes the problem. Signed-off-by: Wu DaoGuang --- drivers/input/touchscreen/s3c2410_ts.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c index 8feb7f3..0cf4f12 100644 --- a/drivers/input/touchscreen/s3c2410_ts.c +++ b/drivers/input/touchscreen/s3c2410_ts.c @@ -126,6 +126,7 @@ static void touch_timer_fire(unsigned long data) input_report_abs(ts.input, ABS_Y, ts.yp); input_report_key(ts.input, BTN_TOUCH, 1); + input_report_abs(ts.input, ABS_PRESSURE, 1); input_sync(ts.input); ts.xp = 0; @@ -140,6 +141,7 @@ static void touch_timer_fire(unsigned long data) ts.count = 0; input_report_key(ts.input, BTN_TOUCH, 0); + input_report_abs(ts.input, ABS_PRESSURE, 0); input_sync(ts.input); writel(WAIT4INT | INT_DOWN, ts.io + S3C2410_ADCTSC); @@ -318,7 +320,7 @@ static int __devinit s3c2410ts_probe(struct platform_device *pdev) ts.input->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); input_set_abs_params(ts.input, ABS_X, 0, 0x3FF, 0, 0); input_set_abs_params(ts.input, ABS_Y, 0, 0x3FF, 0, 0); - + input_set_abs_params(ts.input, ABS_PRESSURE, 0, 1, 0, 0); ts.input->name = "S3C24XX TouchScreen"; ts.input->id.bustype = BUS_HOST; ts.input->id.vendor = 0xDEAD;