From patchwork Sun Jan 30 12:40:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jochen Friedrich X-Patchwork-Id: 517801 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0UD159K015131 for ; Sun, 30 Jan 2011 13:01:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753877Ab1A3NBE (ORCPT ); Sun, 30 Jan 2011 08:01:04 -0500 Received: from mail0.scram.de ([78.47.204.202]:49847 "EHLO mail.scram.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753804Ab1A3NBD (ORCPT ); Sun, 30 Jan 2011 08:01:03 -0500 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sun, 30 Jan 2011 13:01:06 +0000 (UTC) X-Greylist: delayed 1194 seconds by postgrey-1.27 at vger.kernel.org; Sun, 30 Jan 2011 08:01:03 EST Received: from localhost (mail0.scram.de [78.47.204.202]) by localhost (Postfix) with ESMTP id 5C4D3540D5; Sun, 30 Jan 2011 13:41:08 +0100 (CET) Authentication-Results: localhost; dkim=pass (1024-bit key) header.i=@scram.de; dkim-asp=signed X-Virus-Scanned: Debian amavisd-new at colab.de X-Spam-Flag: NO X-Spam-Score: -4.423 X-Spam-Level: X-Spam-Status: No, score=-4.423 required=5 tests=[ALL_TRUSTED=-1.8, AWL=0.286, BAYES_00=-2.599, DKIM_SIGNED=-0.01, DKIM_VERIFIED=-0.3] Authentication-Results: amavis.colab.de (amavisd-new); dkim=pass header.i=@scram.de Received: from mail.scram.de ([78.47.204.202]) by localhost (amavis.colab.de [88.198.23.89]) (amavisd-new, port 10024) with ESMTP id Nec-E-U2pzi3; Sun, 30 Jan 2011 13:41:04 +0100 (CET) Received: from dev1.internal.bocc.de (p54A5FE1B.dip.t-dialin.net [84.165.254.27]) (Authenticated sender: scram287) by mail.scram.de (Postfix) with ESMTPA id 23BFC54084; Sun, 30 Jan 2011 13:41:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scram.de; s=mail201002; t=1296391264; bh=6d5lJV6DwHzxIoqn/VgYJQ5Sa94XPN9GAqUq am3P0EU=; h=From:To:Cc:Subject:Date:Message-Id; b=Hqa5fn+RhoXcKsmtw FeaTMJlf/GDpH07Kytwid3rvVtXyg07leMy7z0nHbSFtxJGdfzD39FN/X0A9clyxtgz 3pyqCq3MH5/h1FE+M/tIrpKe4hzEkQ8qAo41Nvhl+93Lp3uqbwONDVaGJOC8iWfwilE KAzlGk2WI1M5axf+AWRc= From: Jochen Friedrich To: Samuel Ortiz , linux-arm-kernel@lists.infradead.org, linux-input@vger.kernel.org Cc: Samuel Ortiz , Jochen Friedrich Subject: [PATCH] ARM:ucb1x00-ts: ucb1x00_ts - add BTN_TOUCH event Date: Sun, 30 Jan 2011 13:40:56 +0100 Message-Id: <1296391256-2127-1-git-send-email-jochen@scram.de> X-Mailer: git-send-email 1.7.2.3 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org diff --git a/drivers/mfd/ucb1x00-ts.c b/drivers/mfd/ucb1x00-ts.c index 92b85e2..38ffbd5 100644 --- a/drivers/mfd/ucb1x00-ts.c +++ b/drivers/mfd/ucb1x00-ts.c @@ -60,6 +60,7 @@ static inline void ucb1x00_ts_evt_add(struct ucb1x00_ts *ts, u16 pressure, u16 x input_report_abs(idev, ABS_X, x); input_report_abs(idev, ABS_Y, y); input_report_abs(idev, ABS_PRESSURE, pressure); + input_report_key(idev, BTN_TOUCH, 1); input_sync(idev); } @@ -68,6 +69,7 @@ static inline void ucb1x00_ts_event_release(struct ucb1x00_ts *ts) struct input_dev *idev = ts->idev; input_report_abs(idev, ABS_PRESSURE, 0); + input_report_key(idev, BTN_TOUCH, 0); input_sync(idev); } @@ -384,7 +386,8 @@ static int ucb1x00_ts_add(struct ucb1x00_dev *dev) idev->open = ucb1x00_ts_open; idev->close = ucb1x00_ts_close; - __set_bit(EV_ABS, idev->evbit); + idev->evbit[0] = BIT_MASK(EV_ABS) | BIT_MASK(EV_KEY); + idev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); input_set_drvdata(idev, ts);