[PATCH v2 02/11] media: exynos4-is: Request syscon only if ISP writeback is present

Jonathan Bakker xc-racer2 at live.ca
Thu Jul 30 19:01:05 EDT 2020


From: Tomasz Figa <tomasz.figa at gmail.com>

On FIMC variants which don't have writeback channel, there is no need to
access system registers. This patch makes the driver request sysreg
regmap conditionally depending on whether writeback is supported.

Signed-off-by: Tomasz Figa <tomasz.figa at gmail.com>
Signed-off-by: Jonathan Bakker <xc-racer2 at live.ca>
Reviewed-by: Tomasz Figa <tfiga at chromium.org>
Reviewed-by: Sylwester Nawrocki <s.nawrocki at samsung.com>
---
Changes from v1:
- Added R-b tags
---
 drivers/media/platform/exynos4-is/fimc-core.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/media/platform/exynos4-is/fimc-core.c b/drivers/media/platform/exynos4-is/fimc-core.c
index 2258f3bfc929..08d1f39a914c 100644
--- a/drivers/media/platform/exynos4-is/fimc-core.c
+++ b/drivers/media/platform/exynos4-is/fimc-core.c
@@ -954,9 +954,11 @@ static int fimc_probe(struct platform_device *pdev)
 	spin_lock_init(&fimc->slock);
 	mutex_init(&fimc->lock);
 
-	fimc->sysreg = fimc_get_sysreg_regmap(dev->of_node);
-	if (IS_ERR(fimc->sysreg))
-		return PTR_ERR(fimc->sysreg);
+	if (fimc->variant->has_isp_wb) {
+		fimc->sysreg = fimc_get_sysreg_regmap(dev->of_node);
+		if (IS_ERR(fimc->sysreg))
+			return PTR_ERR(fimc->sysreg);
+	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	fimc->regs = devm_ioremap_resource(dev, res);
-- 
2.20.1




More information about the linux-arm-kernel mailing list