From patchwork Thu Apr 21 20:11:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 8903691 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5E7FDBF29F for ; Thu, 21 Apr 2016 20:12:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 973E620303 for ; Thu, 21 Apr 2016 20:12:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C7CD32026D for ; Thu, 21 Apr 2016 20:12:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751742AbcDUUMZ (ORCPT ); Thu, 21 Apr 2016 16:12:25 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:57213 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751761AbcDUUMY (ORCPT ); Thu, 21 Apr 2016 16:12:24 -0400 Received: from localhost.localdomain ([95.91.39.67]) by mrelayeu.kundenserver.de (mreue101) with ESMTPSA (Nemesis) id 0MeShL-1b5lvQ2Bod-00QCde; Thu, 21 Apr 2016 22:11:31 +0200 From: Stefan Wahren To: Jonathan Cameron , Dmitry Torokhov , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Marek Vasut Cc: Fabio Estevam , Juergen Borleis , linux-iio@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH RFT V2 2/3] iio: mxs-lradc: disable only masked channels in mxs_lradc_hw_stop Date: Thu, 21 Apr 2016 20:11:17 +0000 Message-Id: <1461269478-449-3-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1461269478-449-1-git-send-email-stefan.wahren@i2se.com> References: <1461269478-449-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K0:hAkfQOkpQ6nwgwdwa/g2w0wdz35UbHrNRdWh7ZlrkjQKV6ODte+ B57DT93R3bbyUqkinGhu0OA28TBIWFdxVoPgJWuM7noAlbq/qIaXWAuXGmuFbjxZLKiEwne CF1guHX/4SkamoqbgsT6oK3Xf1uEtZfjV3/Kxe6PbzKPvs1E3QKbrCE7BMblSarYhU+8Fa2 f8ZDcRWldYeBQuT+siLlA== X-UI-Out-Filterresults: notjunk:1; V01:K0:i/EfW/+QGc4=:l/x9XbnaJn5fYvVN5liv8H nlGpYbZMzH3vENA/IaeEXnizOXgyPBZOljR5jQI3ewE00loEsl87bCKne8FxbqWxW6GfR8Jnh Eo0NwYUYWU6CTyvSk6Zvtz5+qHVjcpBYUXk7yZhmD29PIQheHXjWstJAJDmAnnrz1wKBpYrOr mQmpA6ydzaQz3JGX7a6UcYxjGHwFNNMCsWdWo14R5sNldN0XtS2MG+b4mX+jhEFYPtpyfPbft yk10Q9MPiDqxlL2TAPprrK582gcF3RW2Cjoi3lJ5Lmx9/2mJzZZ5mYE2g6+49b4J54Dt2WW+6 Llb8kmCzAxEKp7IUj9kLPo93Wit25x1Vn271vIEpnhYibmUi+th/5ihd/bVzf8P/0mwRVoOD9 emDFP5wTnzx+nkBS0z1UfLZig47ULwq0nw9Z3gh8JyXgjXB3UKvv5xXj426y5GFB3ExMoAugn tMV7AWNg2fb2rJ+cWtrF76iQ2YaayO62/1vBr80ioddzxXSDV2lvZZckZfKY/c0w0Ag7zs06f /J3P3KHsvRQxAPeTtbovjqZzp3UXIYUzo7GqeXvtf4oKh8gr7ZXnSjjIFwtX5xb3GbBb3zRpA k+IdQU7AleAp3uq/z9ANhKivBrTM0dC4hFpXdfDwFS0bSKmYNx8HtoviHF/bSWwvMTwXf/xYc sETRIFRw5tjX7QL9bz0rkFVV43PLgrssA66K7RUM+fkFtH+9U+UNkRSRkIJlmVC0jC6M= 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 --- 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 223650b..cfc558f 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) @@ -1505,7 +1498,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));