From patchwork Mon Oct 9 10:14:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 13413333 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 A8335E95A8E for ; Mon, 9 Oct 2023 10:14:58 +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:References:MIME-Version: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:In-Reply-To: List-Owner; bh=5ygx6RVD42zFhkeKBunExbKkzJucgZOzYOHhwq6f8mo=; b=jAOpYcNJ3LtlCp bzhd3WyOMNTh0WSK6pnNeBwreuCqcA6hhv7kPgussQWAXIn43AyYcv1B+qLI2rHakboA7GbHhI3LG pUis/V1UW15I5z1Ii7tTbD391w/pC7k+i43/m/WJaj+Q4oPNoCkyDVVf9kw1tRdtOVfQo1vF+whG4 sImZE+26QqSDX8QeBR8ulCq/3egoEanIj/0iyyUHki/S+OLl42YvCrHGql5yO9Bqoi3Xi05jVUqJJ gahgdQN6tZFffQESnB27tRDkmTjtFrm/LAcvApWhjb5ZNND1NnXnu6ahmWM4JVJOVG61FX7NHz6Ev A8R+2Ew7xVrh4BMNaUyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qpnHP-00AC6F-2W; Mon, 09 Oct 2023 10:14:27 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qpnHN-00AC5i-1B for linux-arm-kernel@lists.infradead.org; Mon, 09 Oct 2023 10:14:27 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20231009101422euoutp02af38c96ddfe4d5a4ccccf4de6b3865e1~MaN4ilORU0369503695euoutp02O for ; Mon, 9 Oct 2023 10:14:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20231009101422euoutp02af38c96ddfe4d5a4ccccf4de6b3865e1~MaN4ilORU0369503695euoutp02O DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1696846462; bh=MYvcvzpld+Wo0XfGrFPZVB0l2+BpWnNYmiZFT6DHJ8I=; h=From:To:Cc:Subject:Date:References:From; b=TmHXFpHS/3NNx7io5dUZAQ8XmMfEWm5uF3QiuywEQAu7Gnrgps0/aj0QleFe72OQv K4RfOizi2+DXfF04XFQpZterigLb/LPeENBMZNGejq/mR016cl3xYOxsvZt0YoqTyu 35dOsGi51fO0QK/nnSdCvJQnaUvNc5t8TBR27Wqc= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20231009101422eucas1p144a8d96dda9dbae73052b1453d1cf2bd~MaN4O4IZS1524215242eucas1p1n; Mon, 9 Oct 2023 10:14:22 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id C6.50.11320.E72D3256; Mon, 9 Oct 2023 11:14:22 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20231009101422eucas1p2c004097457990bbaf9b3cc5df9e246fd~MaN33jaj_1019510195eucas1p2Z; Mon, 9 Oct 2023 10:14:22 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20231009101422eusmtrp2abc60570fb878c75774e7db24005cb4e~MaN33Agew0333703337eusmtrp20; Mon, 9 Oct 2023 10:14:22 +0000 (GMT) X-AuditID: cbfec7f4-993ff70000022c38-f4-6523d27e7b4a Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 42.4C.10549.E72D3256; Mon, 9 Oct 2023 11:14:22 +0100 (BST) Received: from AMDC4653.digital.local (unknown [106.120.51.32]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20231009101421eusmtip24e8a1f17d2d0881aa14d6125916a60c1~MaN2416A-1812118121eusmtip2R; Mon, 9 Oct 2023 10:14:21 +0000 (GMT) From: Marek Szyprowski To: linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Jonathan Cameron , Lars-Peter Clausen , Krzysztof Kozlowski , Alim Akhtar , Arnd Bergmann Subject: [PATCH] iio: exynos-adc: request second interupt only when touchscreen mode is used Date: Mon, 9 Oct 2023 12:14:12 +0200 Message-Id: <20231009101412.916922-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKKsWRmVeSWpSXmKPExsWy7djP87p1l5RTDZquS1s8mLeNzeLvpGPs Fg+aVjFZ7H29ld1iyeT5rBabHl9jtZh35B2LxYzz+5gs1h65y+7A6fH71yRGj02rOtk87lzb w+axeUm9x5I3h1g9+rasYvT4vEkugD2KyyYlNSezLLVI3y6BK2PS9+0sBY95K17s387SwNjA 3cXIySEhYCLRv6iXtYuRi0NIYAWjxImTS1ggnC+MEgufX2OCcD4zShw8cYcJpmX9uW1QVcsZ JT5O+ccM1/Jz20RmkC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kak5mWWqRvl2CXsak79tZCh7zVrzYv52lgbGBu4uRk0NCwERi/bltLF2MXBxC AksZJY6+mcUMkZCRODmtgRXCFpb4c62LDcQWEvjEKHF9bzaIzSZgKNH1FiTOwSEikCXx93Qk yBxmgQYmiefzV7CCxIUFYiSW7pUFKWcRUJX4t2MTO4jNK2AncX73WXaI8fIS+w+eZYaIC0qc nPmEBcRmBoo3b53NPIGRbxaS1CwkqQWMTKsYRVJLi3PTc4sN9YoTc4tL89L1kvNzNzEC42Db sZ+bdzDOe/VR7xAjEwfjIUYJDmYlEV7dUoVUId6UxMqq1KL8+KLSnNTiQ4ymQPdNZJYSTc4H RmJeSbyhmYGpoYmZpYGppZmxkjivZ0FHopBAemJJanZqakFqEUwfEwenVAOT0bVvUU8eignP YLj7zFFXbek69iUTDdjsVz43vbRl3yYpn121R/bnyzLpTGSPXOx4cZECg+9dhik79Q/EyygZ iF/uitw4V+znxWtbvqSVTXqYl1EZHTEheo9oxbXDu/71rT//knFF3juLCXP4HeyXfHQ6w8P7 w+L619yeHqNluoFxXZJX868EbZ5ZvWrzu3ieGUETTUVnlbaXuajcm6Vef/zfHy7PNdzyhtya 5XJyDGVXvDyvFN/as3qOxneOB69+bLvx8/XGd2cWT5vWE/4o9Kv1vcClLus1L4i19rgzL+2W X8B5aXPSL06BQ3Ov5HVXmT6MUvl11CpPbtr7J7XO6+zerg3/0lxtKKVXmOyxVYmlOCPRUIu5 qDgRAMosim4MAwAA X-CMS-MailID: 20231009101422eucas1p2c004097457990bbaf9b3cc5df9e246fd X-Msg-Generator: CA X-RootMTR: 20231009101422eucas1p2c004097457990bbaf9b3cc5df9e246fd X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20231009101422eucas1p2c004097457990bbaf9b3cc5df9e246fd References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231009_031425_801229_4F5C639C X-CRM114-Status: GOOD ( 17.22 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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