From patchwork Tue Aug 13 20:05:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Zubair Lutfullah X-Patchwork-Id: 2844011 Return-Path: X-Original-To: patchwork-linux-input@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 44FA89F239 for ; Tue, 13 Aug 2013 20:06:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5286F2055F for ; Tue, 13 Aug 2013 20:06:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3AF492055E for ; Tue, 13 Aug 2013 20:06:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759066Ab3HMUGW (ORCPT ); Tue, 13 Aug 2013 16:06:22 -0400 Received: from mail-ee0-f45.google.com ([74.125.83.45]:41882 "EHLO mail-ee0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759052Ab3HMUFK (ORCPT ); Tue, 13 Aug 2013 16:05:10 -0400 Received: by mail-ee0-f45.google.com with SMTP id c50so4428943eek.32 for ; Tue, 13 Aug 2013 13:05:08 -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:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=miGzeECv1URq/JsnT51V/g7NaEC8FZ9ebXtBbqI4ikc=; b=gfZc1+ycHhlgHY5k36bxFyCSKNLNCea9tkqyoU518a5tW6XWSFFyCJm1P12XCjFiy4 VruSC58dfA76b6OwsWWCpW4zb29qK61iQFeeB7YoK4whlXhlYFLuNtT2R7GjEEJMcX7e MFQ0zPnVmRvr2GXd7UqqXl9lfHd8C8CEKMHD/I8zv05bkE/RhjNeCD3g3baIJMxPihBz DZ1VxDZX2DExheYdzaRn3LZc2HPVP59tpWwUiGcqM/2xBdq+V/aAnyM7Ub4A6FOlGZ1w JA4+ktC/rWdlTG3A8B8Ndr1ty+6zc36CvUOScafbK9Cem8f2ibIvDE6o0hSlX+mysPnt 2I0Q== X-Received: by 10.14.101.13 with SMTP id a13mr793496eeg.86.1376424308797; Tue, 13 Aug 2013 13:05:08 -0700 (PDT) Received: from localhost.localdomain (cpc3-seac14-0-0-cust157.7-2.cable.virginmedia.com. [81.97.204.158]) by mx.google.com with ESMTPSA id bq1sm68985420eeb.9.2013.08.13.13.05.06 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 Aug 2013 13:05:07 -0700 (PDT) From: Zubair Lutfullah To: jic23@cam.ac.uk, dmitry.torokhov@gmail.com Cc: linux-iio@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, bigeasy@linutronix.de, gregkh@linuxfoundation.org, Russ.Dill@ti.com Subject: =?UTF-8?q?=5BPATCH=201/4=5D=20input=3A=20ti=5Fam335x=5Ftsc=3A=20correct=20step=20mask=20update=20after=20IRQ?= Date: Tue, 13 Aug 2013 21:05:00 +0100 Message-Id: <1376424303-22740-2-git-send-email-zubair.lutfullah@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1376424303-22740-1-git-send-email-zubair.lutfullah@gmail.com> References: <1376424303-22740-1-git-send-email-zubair.lutfullah@gmail.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 TSC steps should be enabled again after IRQ routine. This fix ensures they are updated correctly every time. Signed-off-by: Zubair Lutfullah --- drivers/input/touchscreen/ti_am335x_tsc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c index e1c5300..e165fcb 100644 --- a/drivers/input/touchscreen/ti_am335x_tsc.c +++ b/drivers/input/touchscreen/ti_am335x_tsc.c @@ -52,6 +52,7 @@ struct titsc { u32 config_inp[4]; u32 bit_xp, bit_xn, bit_yp, bit_yn; u32 inp_xp, inp_xn, inp_yp, inp_yn; + u32 step_mask; }; static unsigned int titsc_readl(struct titsc *ts, unsigned int reg) @@ -196,7 +197,8 @@ static void titsc_step_config(struct titsc *ts_dev) /* The steps1 … end and bit 0 for TS_Charge */ stepenable = (1 << (end_step + 2)) - 1; - am335x_tsc_se_set(ts_dev->mfd_tscadc, stepenable); + ts_dev->step_mask = stepenable; + am335x_tsc_se_set(ts_dev->mfd_tscadc, ts_dev->step_mask); } static void titsc_read_coordinates(struct titsc *ts_dev, @@ -316,7 +318,7 @@ static irqreturn_t titsc_irq(int irq, void *dev) if (irqclr) { titsc_writel(ts_dev, REG_IRQSTATUS, irqclr); - am335x_tsc_se_update(ts_dev->mfd_tscadc); + am335x_tsc_se_set(ts_dev->mfd_tscadc, ts_dev->step_mask); return IRQ_HANDLED; } return IRQ_NONE;