OSDN Git Service

media: mt9p031: Fix corrupted frame after restarting stream
authorDirk Bender <d.bender@phytec.de>
Mon, 26 Jul 2021 07:35:15 +0000 (09:35 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 30 Sep 2021 08:07:35 +0000 (10:07 +0200)
commit0961ba6dd211a4a52d1dd4c2d59be60ac2dc08c7
treeb4c91a87196c901f5e86a6756db40c0c863f1fa9
parentae47ee5fc4703bb55278c4185f76c81f980f91eb
media: mt9p031: Fix corrupted frame after restarting stream

To prevent corrupted frames after starting and stopping the sensor its
datasheet specifies a specific pause sequence to follow:

Stopping:
Set Pause_Restart Bit -> Set Restart Bit -> Set Chip_Enable Off

Restarting:
Set Chip_Enable On -> Clear Pause_Restart Bit

The Restart Bit is cleared automatically and must not be cleared
manually as this would cause undefined behavior.

Signed-off-by: Dirk Bender <d.bender@phytec.de>
Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/mt9p031.c