]> git.ipfire.org Git - thirdparty/linux.git/commit
media: v4l: Add helper to get number of active lanes via a pad
authorIsaac Scott <isaac.scott@ideasonboard.com>
Wed, 29 Oct 2025 18:03:18 +0000 (18:03 +0000)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Thu, 13 Nov 2025 09:57:52 +0000 (10:57 +0100)
commitfd3f646e1c9d783d1f4ef30e5376ccf315a8ae30
treee2dd234e17621c9f5aa8659b3b35f4cd2d6f7b3a
parentca042de64800a0bcc3e0866e4efaa4a657e8ddc9
media: v4l: Add helper to get number of active lanes via a pad

Sometimes, users will not use all of the MIPI CSI 2 lanes available when
connecting to the MIPI CSI receiver of their device. Add a helper
function that checks the mbus_config for the device driver to allow
users to define the number of active data lanes through the
get_mbus_config op.

If the driver does not implement this op, fall back to using the maximum
number of lanes available.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Isaac Scott <isaac.scott@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/v4l2-core/v4l2-common.c
include/media/v4l2-common.h