[PATCH v2 72/77] media: imx: imx7_mipi_csis: Fully initialize MIPI_CSIS_DPHYCTRL register

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When setting the CSIS parameters, write the MIPI_CSIS_DPHYCTRL register
fully instead of modifying selected fields, as the register doesn't
contain any reserved fields that need to be preserved. This simplifies
initialization slightly, and ensures that the register value doesn't
depend on its previous state (before a warm reboot for instance).

Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
Reviewed-by: Rui Miguel Silva <rmfrfs@xxxxxxxxx>
---
 drivers/staging/media/imx/imx7-mipi-csis.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c
index 5e907ea46743..26f323bff498 100644
--- a/drivers/staging/media/imx/imx7-mipi-csis.c
+++ b/drivers/staging/media/imx/imx7-mipi-csis.c
@@ -536,10 +536,8 @@ static void mipi_csis_set_params(struct csi_state *state)
 
 	__mipi_csis_set_format(state);
 
-	val = mipi_csis_read(state, MIPI_CSIS_DPHYCTRL);
-	val = (val & ~MIPI_CSIS_DPHYCTRL_HSSETTLE_MASK)
-	    | MIPI_CSIS_DPHYCTRL_HSSETTLE(state->hs_settle);
-	mipi_csis_write(state, MIPI_CSIS_DPHYCTRL, val);
+	mipi_csis_write(state, MIPI_CSIS_DPHYCTRL,
+			MIPI_CSIS_DPHYCTRL_HSSETTLE(state->hs_settle));
 
 	val = (0 << MIPI_CSIS_ISPSYNC_HSYNC_LINTV_OFFSET) |
 		(0 << MIPI_CSIS_ISPSYNC_VSYNC_SINTV_OFFSET) |
-- 
Regards,

Laurent Pinchart




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux