From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0C4F9CD80D4 for ; Tue, 10 Oct 2023 13:49:03 +0000 (UTC) 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:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=M1oCbmBWtnk30z/+GrcrISLq7Urbq8Lp/LCX0+m4X6w=; b=cAlX0U5ynEvD5g uio+npVzHuKo9xPYLobxifuVXUxeoJiLBEGONN5yCkObbi2hRkxNzkUXwCaL+ZZrQ9PLRyHhUnHBl od7FS0tS8bWdOAVyRVCWK+3HeNGCgkMc2fc6bIaecIqOxPNWqt3s3QBy5anQHe9Q23mOScAcwmGWn GT7Low/jSndb7tTzlQn5LXWgrUJZpNTRZ+BbNi5FhmkY0yEGLmhJSKzoZdgBkNy7u0j3ocaB1CaqV ca822Q3bQfsdqYlleT/l6MqBfqYaRTGPCh+siNI+OnwLgoyecKr1piaNQOv7lh0WpCa2lSIV4pU12 6P87lDNquoKQPvmHjjTw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qqD6C-00DULx-2n; Tue, 10 Oct 2023 13:48:36 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qqD6A-00DULL-0I for linux-arm-kernel@lists.infradead.org; Tue, 10 Oct 2023 13:48:35 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id B136ACE1E45; Tue, 10 Oct 2023 13:48:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06288C433C7; Tue, 10 Oct 2023 13:48:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696945710; bh=j/rOh1p2lFzKctXSKqmI3CUT75jOUZE9xdZFghyAX5o=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YRglmqNZ8tw+mqI4v9HiNLZPBZmjxqNz6BH8FEePeu3SfZEk+vCfoU7MNWmoOaJd+ YFxE4bc1L6ByAD5d8mVls981NLYN4OAKkGOAqpiiPsSzsxRu0QQocT/+sPLZyP521B pwAV1EoV6L/HGf5LtuY7aRPug79IXc3Ff+qhr8D95U+9H2rO/Lxg2LxA7Wu9Di1TvL HQjRnaWHFCqWakyBUezDB5DAOjp36BeBEWpd6GbAjXabvHij9O59xnxbK5w1+lMTkS e4JKYsva6SIXdS3bj7iW5ysW147PinVC5HL4lDOEsVLwxxW1vgpPc9bw8ZBACzd+Qe RgmnRUliwd0Tw== Date: Tue, 10 Oct 2023 14:48:39 +0100 From: Jonathan Cameron To: Marek Szyprowski Cc: linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Lars-Peter Clausen , Krzysztof Kozlowski , Alim Akhtar , Arnd Bergmann Subject: Re: [PATCH] iio: exynos-adc: request second interupt only when touchscreen mode is used Message-ID: <20231010144839.11f7c977@jic23-huawei> In-Reply-To: <20231009101412.916922-1-m.szyprowski@samsung.com> References: <20231009101412.916922-1-m.szyprowski@samsung.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231010_064834_369329_08DA6399 X-CRM114-Status: GOOD ( 20.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 9 Oct 2023 12:14:12 +0200 Marek Szyprowski wrote: > Second interrupt is needed only when touchscreen mode is used, so don't > request it unconditionally. This removes the following annoying warning > during boot: > > exynos-adc 14d10000.adc: error -ENXIO: IRQ index 1 not found > > Fixes: 2bb8ad9b44c5 ("iio: exynos-adc: add experimental touchscreen support") > Signed-off-by: Marek Szyprowski Seems reasonable to me but I'll leave on list a few days for other people to take a look. Thanks, Jonathan > --- > drivers/iio/adc/exynos_adc.c | 24 ++++++++++++++---------- > 1 file changed, 14 insertions(+), 10 deletions(-) > > diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c > index eb7a2dd59517..614de9644800 100644 > --- a/drivers/iio/adc/exynos_adc.c > +++ b/drivers/iio/adc/exynos_adc.c > @@ -826,16 +826,26 @@ static int exynos_adc_probe(struct platform_device *pdev) > } > } > > + /* leave out any TS related code if unreachable */ > + if (IS_REACHABLE(CONFIG_INPUT)) { > + has_ts = of_property_read_bool(pdev->dev.of_node, > + "has-touchscreen") || pdata; > + } > + > irq = platform_get_irq(pdev, 0); > if (irq < 0) > return irq; > info->irq = irq; > > - irq = platform_get_irq(pdev, 1); > - if (irq == -EPROBE_DEFER) > - return irq; > + if (has_ts) { > + irq = platform_get_irq(pdev, 1); > + if (irq == -EPROBE_DEFER) > + return irq; > > - info->tsirq = irq; > + info->tsirq = irq; > + } else { > + info->tsirq = -1; > + } > > info->dev = &pdev->dev; > > @@ -900,12 +910,6 @@ static int exynos_adc_probe(struct platform_device *pdev) > if (info->data->init_hw) > info->data->init_hw(info); > > - /* leave out any TS related code if unreachable */ > - if (IS_REACHABLE(CONFIG_INPUT)) { > - has_ts = of_property_read_bool(pdev->dev.of_node, > - "has-touchscreen") || pdata; > - } > - > if (pdata) > info->delay = pdata->delay; > else _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel