From patchwork Mon Nov 17 08:23:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Cochran X-Patchwork-Id: 5315941 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8F4529F2ED for ; Mon, 17 Nov 2014 08:25:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A2E5020125 for ; Mon, 17 Nov 2014 08:25:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C040920115 for ; Mon, 17 Nov 2014 08:25:47 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XqHbU-00028T-Vh; Mon, 17 Nov 2014 08:24:08 +0000 Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XqHbS-00020l-9d for linux-arm-kernel@lists.infradead.org; Mon, 17 Nov 2014 08:24:07 +0000 Received: by mail-wi0-f172.google.com with SMTP id n3so774807wiv.11 for ; Mon, 17 Nov 2014 00:23:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=J4HIs5Y+m/2uK6eV1goXtwyZegjeB5zXaQrEboc2vz0=; b=SECGU9XJcHuBeROuVcae3fjV8APCorngGjQFYYbep6AeTTH3uHozErmVv+SNFK5GOc w24CRnNJ6p+Ncvra8DbugyCJbvPX2gCTrQMEpn/RPmf/WYc0OipVmLVTdL6Hpk8RFZsg ZTGsFGkWLeFX/IZqtCNVFueJxQgYsON8AZXQe4YeX8S4YP9BBDa53RACVA4iwr4iv+CN Xl7Pq69T1061b/aT6mkOEzTb5bgXvbfLqsGIFChILN+ycJ9uygknCjNFkyzYQSqzLz+c kBkjfs9HQLbaTwWGFtarbJ6LgnuLEgVO3fiSFLTN+qCYw9YDmOwZozvtfZq/aCRHMZT/ F7QQ== X-Received: by 10.180.104.234 with SMTP id gh10mr28510280wib.3.1416212623900; Mon, 17 Nov 2014 00:23:43 -0800 (PST) Received: from localhost.localdomain (62-47-209-184.adsl.highway.telekom.at. [62.47.209.184]) by mx.google.com with ESMTPSA id nd20sm14245103wic.11.2014.11.17.00.23.40 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 17 Nov 2014 00:23:42 -0800 (PST) Date: Mon, 17 Nov 2014 09:23:37 +0100 From: Richard Cochran To: Vignesh R Subject: Re: [PATCH v4 2/6] input: touchscreen: ti_am335x_tsc: Remove udelay in interrupt handler Message-ID: <20141117082337.GA3946@localhost.localdomain> References: <1415941651-28962-1-git-send-email-vigneshr@ti.com> <1415941651-28962-3-git-send-email-vigneshr@ti.com> <20141115192739.GA18766@localhost.localdomain> <54697919.5030302@ti.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <54697919.5030302@ti.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141117_002406_489671_6835684C X-CRM114-Status: GOOD ( 17.69 ) X-Spam-Score: -0.8 (/) Cc: Mark Rutland , Tony Lindgren , Sebastian Andrzej Siewior , Paul Gortmaker , Peter Meerwald , Lee Jones , Lars-Peter Clausen , Russell King , Pawel Moll , linux-iio@vger.kernel.org, linux-input@vger.kernel.org, Sanjeev Sharma , devicetree@vger.kernel.org, Brad Griffis , Jan Kardell , Ian Campbell , Kumar Gala , Rob Herring , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Samuel Ortiz , Dmitry Torokhov , linux-kernel@vger.kernel.org, Felipe Balbi , Benoit Cousson , Hartmut Knaack , Jonathan Cameron X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Nov 17, 2014 at 09:57:05AM +0530, Vignesh R wrote: > My patches are based on v3.18rc2. I tested my patches on am335x-evm > using tslib. No beaglebone + cape testing? > Please explain "touch is broken"? What is the behaviour of TSC? With plain v3.17 plus your series, the cursor is almost never near the pen. Mostly it jitters around the right hand edge. My customer had already changed the step delay (I think by trial and error, not sure) in order to get the cursor near the pen. I ported this change onto your series (see patch, below), but still the pen up event causes a huge cursor jump. (Again, I did solve the pen up issue, but in a totally different way. I never posted the fix, because I could not be sure that it would work on a wide variety of boards.) > Which ADC channels are being used for TSC? &tscadc { status = "okay"; tsc { ti,wires = <4>; ti,x-plate-resistance = <300>; ti,coordinate-readouts = <5>; ti,wire-config = <0x00 0x11 0x23 0x32>; }; adc { ti,adc-channels = <5 6 7>; }; }; So for this particular design, your series really does not help, not even a little. You did not test the series on many boards. I am concerned that this series only works on the one board you did test, and that it may break functionality on other people's boards. Thanks, Richard diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c index b84493f..77a4883 100644 --- a/drivers/input/touchscreen/ti_am335x_tsc.c +++ b/drivers/input/touchscreen/ti_am335x_tsc.c @@ -148,7 +148,7 @@ static void titsc_step_config(struct titsc *ts_dev) end_step = first_step + tsc_steps; for (i = end_step - ts_dev->coordinate_readouts; i < end_step; i++) { titsc_writel(ts_dev, REG_STEPCONFIG(i), config); - titsc_writel(ts_dev, REG_STEPDELAY(i), STEPCONFIG_OPENDLY); + titsc_writel(ts_dev, REG_STEPDELAY(i), STEPCONFIG_OPENDLY | STEPDELAY_SAMPLE(20)); } config = 0; @@ -172,7 +172,7 @@ static void titsc_step_config(struct titsc *ts_dev) end_step = first_step + ts_dev->coordinate_readouts; for (i = first_step; i < end_step; i++) { titsc_writel(ts_dev, REG_STEPCONFIG(i), config); - titsc_writel(ts_dev, REG_STEPDELAY(i), STEPCONFIG_OPENDLY); + titsc_writel(ts_dev, REG_STEPDELAY(i), STEPCONFIG_OPENDLY | STEPDELAY_SAMPLE(20)); } /* Make CHARGECONFIG same as IDLECONFIG */ @@ -188,13 +188,13 @@ static void titsc_step_config(struct titsc *ts_dev) STEPCONFIG_INP(ts_dev->inp_xp); titsc_writel(ts_dev, REG_STEPCONFIG(end_step), config); titsc_writel(ts_dev, REG_STEPDELAY(end_step), - STEPCONFIG_OPENDLY); + STEPCONFIG_OPENDLY | STEPDELAY_SAMPLE(20)); end_step++; config |= STEPCONFIG_INP(ts_dev->inp_yn); titsc_writel(ts_dev, REG_STEPCONFIG(end_step), config); titsc_writel(ts_dev, REG_STEPDELAY(end_step), - STEPCONFIG_OPENDLY); + STEPCONFIG_OPENDLY | STEPDELAY_SAMPLE(20)); /* The steps end ... end - readouts * 2 + 2 and bit 0 for TS_Charge */ stepenable = 1;