media: ov5647: Rework s_stream() operation
authorJacopo Mondi <jacopo@jmondi.org>
Thu, 19 Nov 2020 16:35:46 +0000 (17:35 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 12 Jan 2021 16:00:44 +0000 (17:00 +0100)
commit2f038c97fd7baaf9508cf32998a5f8f1ddc09a5e
tree2ab00d92dfeed024ad5607b2ad1fc1a23c57699d
parent089b7c70f0d80f5169cc87f65b065fc80668a0eb
media: ov5647: Rework s_stream() operation

Rework the s_stream() operation to turn the sensor on and
off at stream enable/disable time using the pm_runtime infrastructure.

Protect the stream on/off from being called multiple times in
sequence with a 'streaming' flag.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/ov5647.c