Commit 356345aa authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

media: staging: media: imx: imx7-media-csi: Reorganize imx7_csi structure

The struct imx7_csi fields are in a random order, reorganize them
logically to prepare for adding new fields.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarRui Miguel Silva <rmfrfs@gmail.com>
Tested-by: default avatarAlexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 42bfdc82
...@@ -169,37 +169,41 @@ enum imx_csi_model { ...@@ -169,37 +169,41 @@ enum imx_csi_model {
struct imx7_csi { struct imx7_csi {
struct device *dev; struct device *dev;
struct v4l2_subdev sd;
struct v4l2_async_notifier notifier;
struct imx_media_video_dev *vdev;
struct imx_media_dev *imxmd;
struct media_pad pad[IMX7_CSI_PADS_NUM];
/* lock to protect members below */ /* Resources and locks */
struct mutex lock; void __iomem *regbase;
/* lock to protect irq handler when stop streaming */ int irq;
spinlock_t irqlock; struct clk *mclk;
struct mutex lock; /* Protects is_streaming, format_mbus, cc */
spinlock_t irqlock; /* Protects last_eof */
/* Media and V4L2 device */
struct imx_media_dev *imxmd;
struct v4l2_async_notifier notifier;
struct v4l2_subdev *src_sd; struct v4l2_subdev *src_sd;
bool is_csi2;
/* V4L2 subdev */
struct v4l2_subdev sd;
struct media_pad pad[IMX7_CSI_PADS_NUM];
struct v4l2_mbus_framefmt format_mbus[IMX7_CSI_PADS_NUM]; struct v4l2_mbus_framefmt format_mbus[IMX7_CSI_PADS_NUM];
const struct imx_media_pixfmt *cc[IMX7_CSI_PADS_NUM]; const struct imx_media_pixfmt *cc[IMX7_CSI_PADS_NUM];
void __iomem *regbase; /* Video device */
int irq; struct imx_media_video_dev *vdev;
struct clk *mclk;
/* active vb2 buffers to send to video dev sink */ /* Buffers and streaming state */
struct imx_media_buffer *active_vb2_buf[2]; struct imx_media_buffer *active_vb2_buf[2];
struct imx_media_dma_buf underrun_buf; struct imx_media_dma_buf underrun_buf;
bool is_streaming;
int buf_num; int buf_num;
u32 frame_sequence; u32 frame_sequence;
bool last_eof; bool last_eof;
bool is_streaming;
bool is_csi2;
struct completion last_eof_completion; struct completion last_eof_completion;
enum imx_csi_model model; enum imx_csi_model model;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment