From patchwork Tue Apr 19 16:37:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 563359 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3449743map; Tue, 19 Apr 2022 10:09:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyROla4S8SbqV20YxdMlq4guQyzAB5EPciaRNFcSQnp54ID1YbF9/XCv/+qBkdv/8gPC40 X-Received: by 2002:a05:6871:1ca:b0:e5:a8db:a93f with SMTP id q10-20020a05687101ca00b000e5a8dba93fmr7505969oad.232.1650388169800; Tue, 19 Apr 2022 10:09:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650388169; cv=none; d=google.com; s=arc-20160816; b=SvtZpqG4w/Pp3PZ9TucEGl7JumuT75c3VSqnyT+4RVzLxoy2/zaLZWezezzFd5nOLS WxVazaHNWbNIQMapAA61nvFZwZkMIPbv2d0SSQXLQ/O+r3Ncl2RLjiK52GTKoKNnX4a+ jBN/1yzd3w4veDWDmZ7dKyXN2zoZu/xQ64FPZVBe/Hd7htp9siJUuzyQUZTV92T5G173 caSZtWInkS2BuhVkHHlH2oLs3woUEf2JIVBRsvfXmxl6x4hCcADtVSMmYARVnnMQZz+4 O+LYiJXhuBz1EHFzE/rIJ2K0UlsitEjigg2g5NREMu1DNC2IcMG9gW45E1iupgHVae6V CYpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature; bh=4zeRhAR2XeDINtpBr5Ckh/E7K76NFExi+cP8Kyvz41s=; b=S51g2tanP9gyXuABbw4aw/LHJAQL/iZEfvIStuST5cU47mu+n9MF6siRM32JauEm3y fyh+MAf7nN3A9ks7pJmAu5+IcYq6gwbtzp3/X/4aaq1acYZJsF5zhwR02vZWuwFMBw5f fifT32JpMQ5riU2egaKaQZ/O2n3CFxdQpV9qHqLezqmpFMbP3Lxfn7ezeC2JxuhdQkAZ 1DLWtom6g3jlU2D5Dxt5nM2hpY3XjmuqAlyF6GnjyR7BpQw8MZ6s9ptIO3+SQJCjL3SI 3Jzc5EQvlmiVzPVUUjDqB39QdL6R1Q0s3+LfftYY6kKO3hJ4sW9FD63ekbUrOTDkZVMm ISyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=kBcxErs8; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=bgydP6yE; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id z10-20020a056870738a00b000e28a4122c8si6609441oam.138.2022.04.19.10.09.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Apr 2022 10:09:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=kBcxErs8; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=bgydP6yE; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4zeRhAR2XeDINtpBr5Ckh/E7K76NFExi+cP8Kyvz41s=; b=kBcxErs8jvoTNN HQINWxXHJn/4RHUFfHybIBp84zGA98N7XRE3zwF9fjJcgn7mePdH5Uj4tCDNwfTAiLUQwgUWTIy9I UMEddSCst1S1xfNxyacde9NfwU4YGxjyPJhmVExIqvg+YgKnH7WmF6I7PFFyFMpHtbASjNwqWBp+O wBFsUJD9QQhGenio/Zq2JQL6BzRQfXMjCa88qvDpbnTc7cpIibZQNmPHN5MZpOjo3f9w3kyTmU+0j +Nx7YMEaVkao260K9MO/hgsfh1vXSVvGOqwTGVUe2q9awhdOz6KGU3veX7K/gkwaYdaDYkELcQwzn jO7SWwI6Pod+LflneU+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ngrLQ-005AMk-2I; Tue, 19 Apr 2022 17:08:52 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ngqvi-004xVn-Ik; Tue, 19 Apr 2022 16:42:20 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 21AC3B81AC8; Tue, 19 Apr 2022 16:42:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C2B5C385AB; Tue, 19 Apr 2022 16:42:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650386535; bh=+H1+foy7TUNvzKw9IPZ9qQkuYfuC23E40xmiZHmyw8Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bgydP6yEicIIy/M8QwJCJbhglFA8foOzULMKyltFmXik239VsGUTgzFUAL5wLF9vR yMxOF9N17d8Gm13CkVHGOLvN9CkP3A9XaFnJ0xREaPP+arGnEFt4ixw3igMl35EqXV yxBPns0uK7j+Cic3VAPSr0NWnY/Kss2HLt0dOUCUdopKPuayIfSMRO8b8Yj/pflE6d OgZPFC3CPPvEmh9bxKnVBRiwj34m6rBrBxkiq/Ht4gtHbcdwAztw59OZASONXWI66Q OniZDp9F3QNfXA1+UztViTDb9rtV9YEMtE7mjC9f5RB2LhtOcy2aBCYHme+bCs4eAF KcmwBn+/vfrjA== From: Arnd Bergmann To: robert.jarzmik@free.fr, linux-arm-kernel@lists.infradead.org Cc: Arnd Bergmann , Daniel Mack , Haojian Zhuang , Marek Vasut , Philipp Zabel , Lubomir Rintel , Paul Parsons , Tomas Cech , Sergey Lapin , Thomas Bogendoerfer , Michael Turquette , Stephen Boyd , "Rafael J. Wysocki" , Viresh Kumar , Dmitry Torokhov , Ulf Hansson , Dominik Brodowski , Helge Deller , Mark Brown , Linus Walleij , linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-ide@vger.kernel.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org, linux-input@vger.kernel.org, patches@opensource.cirrus.com, linux-leds@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org, linux-rtc@vger.kernel.org, linux-usb@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, alsa-devel@alsa-project.org Subject: [PATCH 26/48] input: touchscreen: mainstone: fix pxa2xx+pxa3xx configuration Date: Tue, 19 Apr 2022 18:37:48 +0200 Message-Id: <20220419163810.2118169-27-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20220419163810.2118169-1-arnd@kernel.org> References: <20220419163810.2118169-1-arnd@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220419_094219_017951_F8DEA9A4 X-CRM114-Status: GOOD ( 15.16 ) X-Spam-Score: -5.4 (-----) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Arnd Bergmann There are two different ways of flushing the ac97 queue in this driver, selected by a compile time option. Change this to a runtime selection to make it work when both are enabled. Content analysis details: (-5.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [145.40.68.75 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org From: Arnd Bergmann There are two different ways of flushing the ac97 queue in this driver, selected by a compile time option. Change this to a runtime selection to make it work when both are enabled. Acked-by: Dmitry Torokhov Acked-by: Robert Jarzmik Cc: linux-input@vger.kernel.org Signed-off-by: Arnd Bergmann --- drivers/input/touchscreen/mainstone-wm97xx.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/input/touchscreen/mainstone-wm97xx.c b/drivers/input/touchscreen/mainstone-wm97xx.c index 87655105ef3a..618c80847d9f 100644 --- a/drivers/input/touchscreen/mainstone-wm97xx.c +++ b/drivers/input/touchscreen/mainstone-wm97xx.c @@ -98,25 +98,20 @@ MODULE_PARM_DESC(ac97_touch_slot, "Touch screen data slot AC97 number"); /* flush AC97 slot 5 FIFO on pxa machines */ -#ifdef CONFIG_PXA27x -static void wm97xx_acc_pen_up(struct wm97xx *wm) -{ - schedule_timeout_uninterruptible(1); - - while (MISR & (1 << 2)) - MODR; -} -#else static void wm97xx_acc_pen_up(struct wm97xx *wm) { unsigned int count; schedule_timeout_uninterruptible(1); - for (count = 0; count < 16; count++) - MODR; + if (cpu_is_pxa27x()) { + while (MISR & (1 << 2)) + MODR; + } else if (cpu_is_pxa3xx()) { + for (count = 0; count < 16; count++) + MODR; + } } -#endif static int wm97xx_acc_pen_down(struct wm97xx *wm) {