diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-04-13 05:30:10 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-05-23 20:21:32 +0300 |
commit | 0092d4a8ea7f7414a2ca64d455e2fdb0306d8d56 (patch) | |
tree | 3844b8fcb6c9d4136b6d473c262788eb4ccb4195 /drivers/staging/media | |
parent | b4eb02656d0944e03eb991f3feda52f653693653 (diff) | |
download | linux-0092d4a8ea7f7414a2ca64d455e2fdb0306d8d56.tar.xz |
media: imx: imx7_mipi_csis: Reorganize csi_state structure
Group the fiels of the csi_state structure logically to improve
readability.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Tested-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging/media')
-rw-r--r-- | drivers/staging/media/imx/imx7-mipi-csis.c | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c index 363aa28fae57..c302b095ce74 100644 --- a/drivers/staging/media/imx/imx7-mipi-csis.c +++ b/drivers/staging/media/imx/imx7-mipi-csis.c @@ -292,40 +292,33 @@ static const char * const mipi_csis_clk_id[] = { }; struct csi_state { - /* lock elements below */ - struct mutex lock; - /* lock for event handler */ - spinlock_t slock; struct device *dev; - struct media_pad pads[CSIS_PADS_NUM]; - struct v4l2_subdev sd; - struct v4l2_async_notifier notifier; - struct v4l2_subdev *src_sd; - - u8 index; void __iomem *regs; - u32 state; - - struct dentry *debugfs_root; - bool debug; - unsigned int num_clks; struct clk_bulk_data *clks; + struct reset_control *mrst; + struct regulator *mipi_phy_regulator; + u8 index; + struct v4l2_subdev sd; + struct media_pad pads[CSIS_PADS_NUM]; + struct v4l2_async_notifier notifier; + struct v4l2_subdev *src_sd; + + struct v4l2_fwnode_bus_mipi_csi2 bus; u32 clk_frequency; u32 hs_settle; u32 clk_settle; - struct reset_control *mrst; - + struct mutex lock; /* Protect csis_fmt, format_mbus and state */ const struct csis_pix_format *csis_fmt; struct v4l2_mbus_framefmt format_mbus; + u32 state; - struct v4l2_fwnode_bus_mipi_csi2 bus; - + spinlock_t slock; /* Protect events */ struct mipi_csis_event events[MIPI_CSIS_NUM_EVENTS]; - - struct regulator *mipi_phy_regulator; + struct dentry *debugfs_root; + bool debug; }; /* ----------------------------------------------------------------------------- |