media: imx: csi: Implement get_fwnode_pad op
authorSteve Longerbeam <slongerbeam@gmail.com>
Fri, 1 May 2020 17:15:41 +0000 (19:15 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 18 May 2020 12:18:11 +0000 (14:18 +0200)
commit596e5c5801cd97d3528b30447e23578656eba10b
tree1e7b1fd80ecb54a836ac2e0954e4778c68bd9534
parentacee6033c5c5b7758b521ea63bb9f989578aa9fd
media: imx: csi: Implement get_fwnode_pad op

The CSI does not have a 1:1 relationship between fwnode port numbers and
pad indexes. In fact the CSI fwnode device is itself a port which is the
sink, containing only a single fwnode endpoint. Implement media_entity
operation get_fwnode_pad to first verify the given endpoint is the CSI's
sink endpoint, and if so return the CSI sink pad index.

Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.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