From patchwork Sat Apr 23 19:57:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 8918901 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8B17D9F39A for ; Sat, 23 Apr 2016 19:59:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B606B20121 for ; Sat, 23 Apr 2016 19:59:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D23D120122 for ; Sat, 23 Apr 2016 19:59:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752038AbcDWT71 (ORCPT ); Sat, 23 Apr 2016 15:59:27 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:51675 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752133AbcDWT7Z (ORCPT ); Sat, 23 Apr 2016 15:59:25 -0400 Received: from localhost.localdomain ([95.91.39.67]) by mrelayeu.kundenserver.de (mreue002) with ESMTPSA (Nemesis) id 0MWbfO-1bDGIq001y-00Xf9t; Sat, 23 Apr 2016 21:58:26 +0200 From: Stefan Wahren To: Jonathan Cameron , Dmitry Torokhov , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Marek Vasut Cc: Ksenija Stanojevic , Fabio Estevam , Juergen Borleis , linux-iio@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH V3 3/3] iio: mxs-lradc: disable only masked channels in mxs_lradc_hw_stop Date: Sat, 23 Apr 2016 19:57:59 +0000 Message-Id: <1461441479-23218-4-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1461441479-23218-1-git-send-email-stefan.wahren@i2se.com> References: <1461441479-23218-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K0:Iuy+GRPRH+1DbDeWB8L+fgSLD/Yt5ZAwX7gGZ+eFmX+VR6gvmAE smjZgn+BoYSghHOYCj8Tk3iT5f1aMeorVSGr6s3EIRVaCdpde33v/ny8I2gaUiVPCZk/bkr 9hjCTGa3FHk9NLY7HbBTrIkBPynG0CvNh5Td+BO6C8jhRp6uMEPRgJC4PWF5ukurNVmo7o3 l1F2JqjoIIe7QOVayf/6w== X-UI-Out-Filterresults: notjunk:1; V01:K0:CoSMHy0dex4=:/5CaL2wWaIBPhAr6V3P9Ag cL9d+bJFPsxs14zZ2uW/7mdFEvsOkko8BkjfPCRYGv4oxP8PAiUKTCSJqbUovfc34/Re7fsAP 4b2kGHW/+F+BsLGLxotlAF//AoKeaUKukx+q7j09J/vUo7clUCyJD1QH4DHGNxwbAf+RyckT4 XBb/jdXolDM5IiTSBILppzsO170T1rksEi5XCmpCMmoqvAxSkCxU8GpMmEUfM6BJM0r4tLtRB PpRx6hT+AGCOoyBZFxN1yUgwgqwqy36LIin9yTc0RL4CD6pjgJz1TEYtMCJ+9ze0UJsSZliPa 6LngNC49znffeEiT0imhfEMrBIU7BLmrleym23h+CIqOUOYtY3lGMvKx5uMEArKhq+iiNbtBQ qNNbgHfmC/x608WHo8tNUCw0Qx/EdD22xw3CWP8IUas7ox/LPMZ3CKxW4H9771oR+ssLnTQBL Uz6UOfKrZI5r6uyaEHzUtmc85BOVmZBhuEUI6ME/LlP3z+oNdxpMqMFvBSWZtPNK4RU4nknRV K6/7LWBxDPjNgoqAilrLmA1xJIp8If6mLb2Qno32kbDkr2Di+RiYoCoJ0vzZixY6F8KZmk1jd hWphRfPTqqkRtGSYWn4vte9uzhdXYk+yr0WF77A1mUIFpDK+kUJTQsno7lDl8wRjdWLp8fSsc J3yeRcxELDzflihKZMvTxNruk7PpSsGxicsDo26VeQL6ZAPBSeLHmKWqIVt/BjW+2SNE= Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 Disabling of the touchscreen IRQs should be done in mxs_lradc_disable_ts. So disable only the masked virtual channels in mxs_lradc_hw_stop and finally remove the unused function mxs_lradc_irq_en_mask. Signed-off-by: Stefan Wahren Reviewed-by: Marek Vasut Tested-by: Marek Vasut --- drivers/iio/adc/mxs-lradc.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/iio/adc/mxs-lradc.c b/drivers/iio/adc/mxs-lradc.c index 90242ba..b84d37c 100644 --- a/drivers/iio/adc/mxs-lradc.c +++ b/drivers/iio/adc/mxs-lradc.c @@ -373,13 +373,6 @@ static u32 mxs_lradc_plate_mask(struct mxs_lradc *lradc) return LRADC_CTRL0_MX28_PLATE_MASK; } -static u32 mxs_lradc_irq_en_mask(struct mxs_lradc *lradc) -{ - if (lradc->soc == IMX23_LRADC) - return LRADC_CTRL1_MX23_LRADC_IRQ_EN_MASK; - return LRADC_CTRL1_MX28_LRADC_IRQ_EN_MASK; -} - static u32 mxs_lradc_irq_mask(struct mxs_lradc *lradc) { if (lradc->soc == IMX23_LRADC) @@ -1496,7 +1489,9 @@ static void mxs_lradc_hw_stop(struct mxs_lradc *lradc) { int i; - mxs_lradc_reg_clear(lradc, mxs_lradc_irq_en_mask(lradc), LRADC_CTRL1); + mxs_lradc_reg_clear(lradc, + lradc->buffer_vchans << LRADC_CTRL1_LRADC_IRQ_EN_OFFSET, + LRADC_CTRL1); for (i = 0; i < LRADC_MAX_DELAY_CHANS; i++) mxs_lradc_reg_wrt(lradc, 0, LRADC_DELAY(i));