Skip to content

Commit 865b080

Browse files
mszyprowjic23
authored andcommitted
iio: exynos-adc: request second interupt only when touchscreen mode is used
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: 2bb8ad9 ("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>
1 parent e2bd8c2 commit 865b080

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

drivers/iio/adc/exynos_adc.c

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -826,16 +826,26 @@ static int exynos_adc_probe(struct platform_device *pdev)
826826
}
827827
}
828828

829+
/* leave out any TS related code if unreachable */
830+
if (IS_REACHABLE(CONFIG_INPUT)) {
831+
has_ts = of_property_read_bool(pdev->dev.of_node,
832+
"has-touchscreen") || pdata;
833+
}
834+
829835
irq = platform_get_irq(pdev, 0);
830836
if (irq < 0)
831837
return irq;
832838
info->irq = irq;
833839

834-
irq = platform_get_irq(pdev, 1);
835-
if (irq == -EPROBE_DEFER)
836-
return irq;
840+
if (has_ts) {
841+
irq = platform_get_irq(pdev, 1);
842+
if (irq == -EPROBE_DEFER)
843+
return irq;
837844

838-
info->tsirq = irq;
845+
info->tsirq = irq;
846+
} else {
847+
info->tsirq = -1;
848+
}
839849

840850
info->dev = &pdev->dev;
841851

@@ -900,12 +910,6 @@ static int exynos_adc_probe(struct platform_device *pdev)
900910
if (info->data->init_hw)
901911
info->data->init_hw(info);
902912

903-
/* leave out any TS related code if unreachable */
904-
if (IS_REACHABLE(CONFIG_INPUT)) {
905-
has_ts = of_property_read_bool(pdev->dev.of_node,
906-
"has-touchscreen") || pdata;
907-
}
908-
909913
if (pdata)
910914
info->delay = pdata->delay;
911915
else

0 commit comments

Comments
 (0)