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 {
struct imx7_csi {
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 */
struct mutex lock;
/* lock to protect irq handler when stop streaming */
spinlock_t irqlock;
/* Resources and locks */
void __iomem *regbase;
int irq;
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;
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];
const struct imx_media_pixfmt *cc[IMX7_CSI_PADS_NUM];
void __iomem *regbase;
int irq;
struct clk *mclk;
/* Video device */
struct imx_media_video_dev *vdev;
/* active vb2 buffers to send to video dev sink */
/* Buffers and streaming state */
struct imx_media_buffer *active_vb2_buf[2];
struct imx_media_dma_buf underrun_buf;
bool is_streaming;
int buf_num;
u32 frame_sequence;
bool last_eof;
bool is_streaming;
bool is_csi2;
struct completion last_eof_completion;
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