From patchwork Mon Jun 10 05:53:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 2695801 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by patchwork1.kernel.org (Postfix) with ESMTP id 923A73FD4F for ; Mon, 10 Jun 2013 05:55:34 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id r5A5rvFL023793; Mon, 10 Jun 2013 00:53:57 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r5A5rvHR006924; Mon, 10 Jun 2013 00:53:57 -0500 Received: from dlelxv24.itg.ti.com (172.17.1.199) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.2.342.3; Mon, 10 Jun 2013 00:53:56 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id r5A5ruui012344; Mon, 10 Jun 2013 00:53:56 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 908AD80627; Mon, 10 Jun 2013 00:53:56 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id 4C9E980626 for ; Mon, 10 Jun 2013 00:53:52 -0500 (CDT) Received: from white.ext.ti.com (white.ext.ti.com [192.94.93.38]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id r5A5rqpl003161 for ; Mon, 10 Jun 2013 00:53:52 -0500 (CDT) Received: from mail6.bemta7.messagelabs.com (mail6.bemta7.messagelabs.com [216.82.255.55]) by white.ext.ti.com (8.13.7/8.13.7) with ESMTP id r5A5rpow027143 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 10 Jun 2013 00:53:51 -0500 Received: from [216.82.253.163:63298] by server-11.bemta-7.messagelabs.com id 96/E4-23312-FE965B15; Mon, 10 Jun 2013 05:53:51 +0000 X-Env-Sender: dmitry.torokhov@gmail.com X-Msg-Ref: server-7.tower-166.messagelabs.com!1370843630!16493298!1 X-Originating-IP: [209.85.160.54] X-SpamReason: No, hits=0.0 required=7.0 tests=ML_RADAR_SPEW_LINKS_14, spamassassin: X-StarScan-Received: X-StarScan-Version: 6.9.6; banners=-,-,- X-VirusChecked: Checked Received: (qmail 16363 invoked from network); 10 Jun 2013 05:53:50 -0000 Received: from mail-pb0-f54.google.com (HELO mail-pb0-f54.google.com) (209.85.160.54) by server-7.tower-166.messagelabs.com with RC4-SHA encrypted SMTP; 10 Jun 2013 05:53:50 -0000 Received: by mail-pb0-f54.google.com with SMTP id ro2so6843093pbb.41 for ; Sun, 09 Jun 2013 22:53:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=TU/Z5Hzp+RWTOhC8m0FkP52jfYnBRqq1BwRZJpMcr2E=; b=ZacZPenf0/wslyxAvKUdJJG6R9+SNkXuSjuo+Kk2SP6jpBpWnHrIJ99OGQyINN3Ngi t2jIWB7BFpG4VsVqLpAr9U2UyaG4s2KiENg2gCFZHhkkLXN4Fs6yRN1bpBRvVrBYKjft ZoPEWXcnqfFXhVlShxdlvJs/squvzzT/XXWs80qo8VhecclEmjCbuuajcWqy8n7UvHS7 cCD44Eu9K5c4APET2T55cuD5QwRHCGuWAED8mv697O/cUMzQleko4pNK3IwWOQ1UmZj3 LqWVc/8UtpdzHdUQJ1pthA70bq7RrsNiXzXSjH1kIbSiiuM3PnWAJsl4IqLshN0//rId NHYA== X-Received: by 10.66.193.72 with SMTP id hm8mr12738960pac.23.1370843629725; Sun, 09 Jun 2013 22:53:49 -0700 (PDT) Received: from mailhub.coreip.homeip.net (c-67-188-112-76.hsd1.ca.comcast.net. [67.188.112.76]) by mx.google.com with ESMTPSA id qh4sm14165413pac.8.2013.06.09.22.53.48 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 09 Jun 2013 22:53:49 -0700 (PDT) From: Dmitry Torokhov To: Subject: [PATCH 1/3] Input: tps6507x-ts - use bool for booleans Date: Sun, 9 Jun 2013 22:53:45 -0700 Message-ID: <1370843627-30823-1-git-send-email-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 1.8.1.4 CC: X-BeenThere: davinci-linux-open-source@linux.davincidsp.com 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: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com Signed-off-by: Dmitry Torokhov --- Note that neither of these 3 patches has been tested on the real hardware as I don't have it so if someone could give them a spin that would be great. drivers/input/touchscreen/tps6507x-ts.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/input/touchscreen/tps6507x-ts.c b/drivers/input/touchscreen/tps6507x-ts.c index 1fb397c..c981ccf 100644 --- a/drivers/input/touchscreen/tps6507x-ts.c +++ b/drivers/input/touchscreen/tps6507x-ts.c @@ -45,12 +45,12 @@ struct tps6507x_ts { struct ts_event tc; struct tps6507x_dev *mfd; u16 model; - unsigned pendown; + u16 min_pressure; int irq; void (*clear_penirq)(void); unsigned long poll_period; /* ms */ - u16 min_pressure; int vref; /* non-zero to leave vref on */ + bool pendown; }; static int tps6507x_read_u8(struct tps6507x_ts *tsc, u8 reg, u8 *data) @@ -165,12 +165,12 @@ static void tps6507x_ts_handler(struct work_struct *work) struct tps6507x_ts *tsc = container_of(work, struct tps6507x_ts, work.work); struct input_dev *input_dev = tsc->input_dev; - int pendown; + bool pendown; int schd; s32 ret; - ret = tps6507x_adc_conversion(tsc, TPS6507X_TSCMODE_PRESSURE, - &tsc->tc.pressure); + ret = tps6507x_adc_conversion(tsc, TPS6507X_TSCMODE_PRESSURE, + &tsc->tc.pressure); if (ret) goto done; @@ -181,7 +181,7 @@ static void tps6507x_ts_handler(struct work_struct *work) input_report_key(input_dev, BTN_TOUCH, 0); input_report_abs(input_dev, ABS_PRESSURE, 0); input_sync(input_dev); - tsc->pendown = 0; + tsc->pendown = false; } if (pendown) { @@ -206,7 +206,7 @@ static void tps6507x_ts_handler(struct work_struct *work) input_report_abs(input_dev, ABS_Y, tsc->tc.y); input_report_abs(input_dev, ABS_PRESSURE, tsc->tc.pressure); input_sync(input_dev); - tsc->pendown = 1; + tsc->pendown = true; } done: