public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: kernel-lts@openela.org
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
	Stable@vger.kernel.org,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 4.14-openela 013/190] iio: exynos-adc: request second interupt only when touchscreen mode is used
Date: Mon, 15 Apr 2024 06:49:03 -0400	[thread overview]
Message-ID: <20240415105208.3137874-14-sashal@kernel.org> (raw)
In-Reply-To: <20240415105208.3137874-1-sashal@kernel.org>

From: Marek Szyprowski <m.szyprowski@samsung.com>

[ Upstream commit 865b080e3229102f160889328ce2e8e97aa65ea0 ]

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 <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/20231009101412.916922-1-m.szyprowski@samsung.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 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 019153882e700..f8324261e74d4 100644
--- a/drivers/iio/adc/exynos_adc.c
+++ b/drivers/iio/adc/exynos_adc.c
@@ -787,6 +787,12 @@ 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) {
 		dev_err(&pdev->dev, "no irq resource?\n");
@@ -794,11 +800,15 @@ static int exynos_adc_probe(struct platform_device *pdev)
 	}
 	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;
 
@@ -865,12 +875,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
-- 
2.43.0


  parent reply	other threads:[~2024-04-15 13:38 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240415105208.3137874-1-sashal@kernel.org>
2024-04-15 10:48 ` [PATCH 4.14-openela 003/190] ALSA: jack: Fix mutex call in snd_jack_report() Sasha Levin
2024-04-15 10:48 ` [PATCH 4.14-openela 004/190] pinctrl: amd: Detect internal GPIO0 debounce handling Sasha Levin
2024-04-15 10:48 ` [PATCH 4.14-openela 005/190] btrfs: fix extent buffer leak after tree mod log failure at split_node() Sasha Levin
2024-04-15 10:48 ` [PATCH 4.14-openela 007/190] IMA: allow/fix UML builds Sasha Levin
2024-04-15 10:48 ` [PATCH 4.14-openela 008/190] iio: addac: stx104: Fix race condition for stx104_write_raw() Sasha Levin
2024-04-15 10:48 ` [PATCH 4.14-openela 009/190] block: fix signed int overflow in Amiga partition support Sasha Levin
2024-04-15 13:58   ` Geert Uytterhoeven
2024-04-15 10:49 ` [PATCH 4.14-openela 012/190] selftests/ftrace: Add new test case which checks non unique symbol Sasha Levin
2024-04-15 10:49 ` Sasha Levin [this message]
2024-04-15 10:49 ` [PATCH 4.14-openela 021/190] MIPS: KVM: Fix a build warning about variable set but not used Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 022/190] smb3: fix touch -h of symlink Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 023/190] fbdev: stifb: Make the STI next font pointer a 32-bit signed offset Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 025/190] arm64: dts: mediatek: mt8173-evb: Fix regulator-fixed node names Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 028/190] btrfs: do not allow non subvolume root targets for snapshot Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 029/190] smb: client: fix OOB in smbCalcSize() Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 031/190] IB/hfi1: Fix sdma.h tx->num_descs off-by-one error Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 032/190] pinctrl: amd: Only use special debounce behavior for GPIO 0 Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 033/190] PCI: qcom: Disable write access to read only registers for IP v2.3.3 Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 034/190] ASoC: cs42l51: fix driver to properly autoload with automatic module loading Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 044/190] PCI: keystone: Don't discard .remove() callback Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 045/190] PCI: keystone: Don't discard .probe() callback Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 046/190] ksmbd: fix wrong name of SMB2_CREATE_ALLOCATION_SIZE Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 049/190] usb: musb: fix MUSB_QUIRK_B_DISCONNECT_99 handling Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240415105208.3137874-14-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=Stable@vger.kernel.org \
    --cc=kernel-lts@openela.org \
    --cc=m.szyprowski@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox