From: Philipp Zabel <p.zabel@pengutronix.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Russell King <rmk+kernel@arm.linux.org.uk>,
Dave Airlie <airlied@redhat.com>
Cc: devel@driverdev.osuosl.org, linux-fbdev@vger.kernel.org,
dri-devel@lists.freedesktop.org, drm-devel@vger.kernel.org,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
kernel@pengutronix.de
Subject: [PATCH v2 4/5] gpu: ipu-v3: Add CSI and SMFC module enable wrappers
Date: Mon, 26 May 2014 14:19:42 +0000 [thread overview]
Message-ID: <1401113983-23132-5-git-send-email-p.zabel@pengutronix.de> (raw)
In-Reply-To: <1401113983-23132-1-git-send-email-p.zabel@pengutronix.de>
IPU_CONF_..._EN bits are implementation details, not to be made public.
Add wrappers around ipu_module_enable/disable, so the CSI V4L2 driver
can enable/disable the CSI and SMFC modules.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
drivers/gpu/ipu-v3/ipu-common.c | 24 ++++++++++++++++++++++++
include/video/imx-ipu-v3.h | 8 ++++++++
2 files changed, 32 insertions(+)
diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c
index 706a6f2..03f48b7 100644
--- a/drivers/gpu/ipu-v3/ipu-common.c
+++ b/drivers/gpu/ipu-v3/ipu-common.c
@@ -661,6 +661,30 @@ int ipu_module_disable(struct ipu_soc *ipu, u32 mask)
}
EXPORT_SYMBOL_GPL(ipu_module_disable);
+int ipu_csi_enable(struct ipu_soc *ipu, int csi)
+{
+ return ipu_module_enable(ipu, csi ? IPU_CONF_CSI1_EN : IPU_CONF_CSI0_EN);
+}
+EXPORT_SYMBOL_GPL(ipu_csi_enable);
+
+int ipu_csi_disable(struct ipu_soc *ipu, int csi)
+{
+ return ipu_module_disable(ipu, csi ? IPU_CONF_CSI1_EN : IPU_CONF_CSI0_EN);
+}
+EXPORT_SYMBOL_GPL(ipu_csi_disable);
+
+int ipu_smfc_enable(struct ipu_soc *ipu)
+{
+ return ipu_module_enable(ipu, IPU_CONF_SMFC_EN);
+}
+EXPORT_SYMBOL_GPL(ipu_smfc_enable);
+
+int ipu_smfc_disable(struct ipu_soc *ipu)
+{
+ return ipu_module_disable(ipu, IPU_CONF_SMFC_EN);
+}
+EXPORT_SYMBOL_GPL(ipu_smfc_disable);
+
int ipu_idmac_get_current_buffer(struct ipuv3_channel *channel)
{
struct ipu_soc *ipu = channel->ipu;
diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h
index a7edf6a..ac7fbfa 100644
--- a/include/video/imx-ipu-v3.h
+++ b/include/video/imx-ipu-v3.h
@@ -167,8 +167,16 @@ int ipu_dp_set_global_alpha(struct ipu_dp *dp, bool enable, u8 alpha,
bool bg_chan);
/*
+ * IPU CMOS Sensor Interface (csi) functions
+ */
+int ipu_csi_enable(struct ipu_soc *ipu, int csi);
+int ipu_csi_disable(struct ipu_soc *ipu, int csi);
+
+/*
* IPU Sensor Multiple FIFO Controller (SMFC) functions
*/
+int ipu_smfc_enable(struct ipu_soc *ipu);
+int ipu_smfc_disable(struct ipu_soc *ipu);
int ipu_smfc_map_channel(struct ipu_soc *ipu, int channel, int csi_id, int mipi_id);
int ipu_smfc_set_burstsize(struct ipu_soc *ipu, int channel, int burstsize);
--
2.0.0.rc2
next prev parent reply other threads:[~2014-05-26 14:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-26 14:19 [PATCH v2 0/5] Move IPUv3 core out of staging, add CSI support Philipp Zabel
2014-05-26 14:19 ` [PATCH v2 1/5] gpu: ipu-v3: Move i.MX IPUv3 core driver out of staging Philipp Zabel
2014-05-28 21:13 ` Greg Kroah-Hartman
2014-06-02 16:36 ` Philipp Zabel
2014-06-02 17:06 ` Greg Kroah-Hartman
2014-06-04 3:07 ` Dave Airlie
2014-05-26 14:19 ` [PATCH v2 2/5] gpu: ipu-v3: Add SMFC code Philipp Zabel
2014-05-26 14:19 ` [PATCH v2 3/5] gpu: ipu-v3: Add ipu_idmac_get_current_buffer function Philipp Zabel
2014-05-26 14:19 ` Philipp Zabel [this message]
2014-05-26 14:19 ` [PATCH v2 5/5] gpu: ipu-v3: Register the CSI modules Philipp Zabel
2014-05-26 18:54 ` [PATCH v2 0/5] Move IPUv3 core out of staging, add CSI support Philipp Zabel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1401113983-23132-5-git-send-email-p.zabel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=airlied@redhat.com \
--cc=devel@driverdev.osuosl.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=drm-devel@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel@pengutronix.de \
--cc=linux-fbdev@vger.kernel.org \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).