summaryrefslogtreecommitdiff
path: root/drivers/media/platform/marvell-ccic/mcam-core.h
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2019-05-28 05:07:31 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-06-24 11:33:49 -0400
commit81a409bfd5517d537097d3cfdfed7f8bf8ac469c (patch)
tree37a330662f37bfe06098d168346a627f32f981f4 /drivers/media/platform/marvell-ccic/mcam-core.h
parent3eefe36cc00c5391b1ca2a68c5f01e9aa127c2a6 (diff)
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>
Diffstat (limited to 'drivers/media/platform/marvell-ccic/mcam-core.h')
-rw-r--r--drivers/media/platform/marvell-ccic/mcam-core.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/platform/marvell-ccic/mcam-core.h b/drivers/media/platform/marvell-ccic/mcam-core.h
index 4a72213aca1a..2e3a7567a76a 100644
--- a/drivers/media/platform/marvell-ccic/mcam-core.h
+++ b/drivers/media/platform/marvell-ccic/mcam-core.h
@@ -8,6 +8,7 @@
#define _MCAM_CORE_H
#include <linux/list.h>
+#include <linux/clk-provider.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-dev.h>
@@ -125,6 +126,8 @@ struct mcam_camera {
/* clock tree support */
struct clk *clk[NR_MCAM_CLK];
+ struct clk_hw mclk_hw;
+ struct clk *mclk;
/*
* Callbacks from the core to the platform code.