summaryrefslogtreecommitdiff
path: root/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2022-06-14 22:11:12 +0300
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-07-17 14:31:13 +0300
commitb298f059b92cfcc46f559471f8de691ef723ee4f (patch)
tree8af285aaf0317fa6fde36e183c6597238c768102 /drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
parent8b52ec2d1896223d620c27688024168194d7482b (diff)
downloadlinux-b298f059b92cfcc46f559471f8de691ef723ee4f.tar.xz
media: rkisp1: csi: Implement a V4L2 subdev for the CSI receiver
The CSI receiver is a component separate from the ISP or the resizers. It is actually optional, not all device model include a CSI receiver. On some SoCs CSI-2 support can be provided through an external CSI-2 receiver, connected to the ISP's parallel input. To support those use cases, create a V4L2 subdev to model the CSI receiver. It will allow the driver to handle both internal and external CSI receivers the same way. The next commit will plumb the CSI subdev to the rest of the driver, replacing direct function calls. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Dafna Hirschfeld <dafna@fastmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c')
-rw-r--r--drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
index 2c441665c017..5428e19e818f 100644
--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
+++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c
@@ -324,6 +324,7 @@ static int rkisp1_create_links(struct rkisp1_device *rkisp1)
static void rkisp1_entities_unregister(struct rkisp1_device *rkisp1)
{
+ rkisp1_csi_unregister(rkisp1);
rkisp1_params_unregister(rkisp1);
rkisp1_stats_unregister(rkisp1);
rkisp1_capture_devs_unregister(rkisp1);
@@ -355,6 +356,10 @@ static int rkisp1_entities_register(struct rkisp1_device *rkisp1)
if (ret)
goto error;
+ ret = rkisp1_csi_register(rkisp1);
+ if (ret)
+ goto error;
+
ret = rkisp1_create_links(rkisp1);
if (ret)
goto error;