OSDN Git Service

media: imx5/6/7: csi: Mark a bound video mux as a CSI mux
authorSteve Longerbeam <slongerbeam@gmail.com>
Fri, 1 May 2020 17:15:52 +0000 (19:15 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 18 May 2020 12:29:35 +0000 (14:29 +0200)
commit86e02d07871c2ea389cc94becb2009c59420cd57
treef4dc9516e708ede31a4b715123e7c408cd30f223
parentfe7aee5d353346968eba111a0414250d8cc09527
media: imx5/6/7: csi: Mark a bound video mux as a CSI mux

For i.MX5/6, if the bound subdev is a video mux, it must be one of the
CSI muxes, and for i.MX7, the bound subdev must always be a CSI mux.

So if the bound subdev is a video mux, mark it as a CSI mux with a new
group id IMX_MEDIA_GRP_ID_CSI_MUX.

In the process use the new group id in csi_get_upstream_endpoint(), and
do some cleanup in that function for better readability.

Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/imx/imx-media-csi.c
drivers/staging/media/imx/imx-media.h
drivers/staging/media/imx/imx7-media-csi.c