From patchwork Thu Dec 13 05:27:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vipul kumar samar X-Patchwork-Id: 1871321 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 1C87F3FC64 for ; Thu, 13 Dec 2012 05:27:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750720Ab2LMF1g (ORCPT ); Thu, 13 Dec 2012 00:27:36 -0500 Received: from eu1sys200aog109.obsmtp.com ([207.126.144.127]:52098 "EHLO eu1sys200aog109.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750708Ab2LMF1f (ORCPT ); Thu, 13 Dec 2012 00:27:35 -0500 Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob109.postini.com ([207.126.147.11]) with SMTP ID DSNKUMlnNG/2/oeVfkvFfhrDpgpPa62BtFBb@postini.com; Thu, 13 Dec 2012 05:27:35 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 0A416126; Thu, 13 Dec 2012 05:19:01 +0000 (GMT) Received: from Webmail-ap.st.com (eapex1hubcas3.st.com [10.80.176.67]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id CE144D02; Thu, 13 Dec 2012 05:27:12 +0000 (GMT) Received: from localhost (10.199.88.117) by Webmail-ap.st.com (10.80.176.7) with Microsoft SMTP Server (TLS) id 8.3.245.1; Thu, 13 Dec 2012 13:27:12 +0800 From: Vipul Kumar Samar To: , Cc: , , , , , Vipul Kumar Samar Subject: [PATCH] input:stmpe-ts: Add support to report BTN_TOUCH event Date: Thu, 13 Dec 2012 10:57:10 +0530 Message-ID: <7c50ed5f531db8ab992ebeaf1a48853a6274faf2.1355376050.git.vipulkumar.samar@st.com> X-Mailer: git-send-email 1.7.2.2 MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org stmpe touchscreen supports BTN_TOUCH event but doesn't report it. Add BTN_TOUCH reporting capability to the stmpe touchscreen driver. Signed-off-by: Vipul Kumar Samar Reviewed-by: Viresh Kumar Acked-by: Lee Jones --- drivers/input/touchscreen/stmpe-ts.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/input/touchscreen/stmpe-ts.c b/drivers/input/touchscreen/stmpe-ts.c index 076442a..c3399a1 100644 --- a/drivers/input/touchscreen/stmpe-ts.c +++ b/drivers/input/touchscreen/stmpe-ts.c @@ -121,6 +121,7 @@ static void stmpe_work(struct work_struct *work) __stmpe_reset_fifo(ts->stmpe); input_report_abs(ts->idev, ABS_PRESSURE, 0); + input_report_key(ts->idev, BTN_TOUCH, 0); input_sync(ts->idev); } @@ -154,6 +155,7 @@ static irqreturn_t stmpe_ts_handler(int irq, void *data) input_report_abs(ts->idev, ABS_X, x); input_report_abs(ts->idev, ABS_Y, y); input_report_abs(ts->idev, ABS_PRESSURE, z); + input_report_key(ts->idev, BTN_TOUCH, 1); input_sync(ts->idev); /* flush the FIFO after we have read out our values. */