From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bin-mail-out-06.binero.net ([195.74.38.229]:46808 "EHLO bin-mail-out-06.binero.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728336AbeKBIiQ (ORCPT ); Fri, 2 Nov 2018 04:38:16 -0400 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= To: Laurent Pinchart , Sakari Ailus , Benoit Parrot , linux-media@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org Subject: [PATCH v2 22/30] v4l: Add CSI-2 bus configuration to frame descriptors Date: Fri, 2 Nov 2018 00:31:36 +0100 Message-Id: <20181101233144.31507-23-niklas.soderlund+renesas@ragnatech.se> In-Reply-To: <20181101233144.31507-1-niklas.soderlund+renesas@ragnatech.se> References: <20181101233144.31507-1-niklas.soderlund+renesas@ragnatech.se> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-renesas-soc-owner@vger.kernel.org List-ID: From: Sakari Ailus Add CSI-2 bus specific configuration to the frame descriptors. This allows obtaining the virtual channel and data type information for each stream the transmitter is sending. Signed-off-by: Sakari Ailus Reviewed-by: Niklas Söderlund --- include/media/v4l2-subdev.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index ac1f7ee4cdb978ad..ffd98e4f368358a6 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -317,6 +317,17 @@ struct v4l2_subdev_audio_ops { int (*s_stream)(struct v4l2_subdev *sd, int enable); }; +/** + * struct v4l2_mbus_frame_desc_entry_csi2 + * + * @channel: CSI-2 virtual channel + * @data_type: CSI-2 data type ID + */ +struct v4l2_mbus_frame_desc_entry_csi2 { + u8 channel; + u8 data_type; +}; + /** * enum v4l2_mbus_frame_desc_entry - media bus frame description flags * @@ -340,11 +351,16 @@ enum v4l2_mbus_frame_desc_flags { * %FRAME_DESC_FL_BLOB is not set. * @length: number of octets per frame, valid if @flags * %V4L2_MBUS_FRAME_DESC_FL_LEN_MAX is set. + * @bus: Bus specific frame descriptor parameters + * @bus.csi2: CSI-2 specific bus configuration */ struct v4l2_mbus_frame_desc_entry { enum v4l2_mbus_frame_desc_flags flags; u32 pixelcode; u32 length; + union { + struct v4l2_mbus_frame_desc_entry_csi2 csi2; + } bus; }; #define V4L2_FRAME_DESC_ENTRY_MAX 4 -- 2.19.1