media: marvell-ccic: provide a clock for the sensor
authorLubomir Rintel <lkundrak@v3.sk>
Tue, 28 May 2019 09:07:31 +0000 (05:07 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 24 Jun 2019 15:33:49 +0000 (11:33 -0400)
commit81a409bfd5517d537097d3cfdfed7f8bf8ac469c
tree37a330662f37bfe06098d168346a627f32f981f4
parent3eefe36cc00c5391b1ca2a68c5f01e9aa127c2a6
media: marvell-ccic: provide a clock for the sensor

The sensor needs the MCLK clock running when it's being probed. On
platforms where the sensor is instantiated from a DT (MMP2) it is going
to happen asynchronously.

Therefore, the current modus operandi, where the bridge driver fiddles
with the sensor power and clock itself is not going to fly. As the comments
wisely note, this doesn't even belong there.

Luckily, the ov7670 driver is already able to control its power and
reset lines, we can just drop the MMP platform glue altogether.

It also requests the clock via the standard clock subsystem. Good -- let's
set up a clock instance so that the sensor can ask us to enable the clock.
Note that this is pretty dumb at the moment: the clock is hardwired to a
particular frequency and parent. It was always the case.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/marvell-ccic/Kconfig
drivers/media/platform/marvell-ccic/cafe-driver.c
drivers/media/platform/marvell-ccic/mcam-core.c
drivers/media/platform/marvell-ccic/mcam-core.h
drivers/media/platform/marvell-ccic/mmp-driver.c
include/linux/platform_data/media/mmp-camera.h