From: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
To: linux-renesas-soc@vger.kernel.org
Cc: laurent.pinchart@ideasonboard.com,
dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org,
magnus.damm@gmail.com,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Subject: [PATCH v1.5 2/6] v4l: rcar-fcp: Add an API to retrieve the FCP device
Date: Fri, 9 Dec 2016 13:35:08 +0100 [thread overview]
Message-ID: <1481286912-16555-3-git-send-email-ulrich.hecht+renesas@gmail.com> (raw)
In-Reply-To: <1481286912-16555-1-git-send-email-ulrich.hecht+renesas@gmail.com>
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
The new rcar_fcp_get_device() function retrieves the struct device
related to the FCP device. This is useful to handle DMA mapping through
the right device.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
drivers/media/platform/rcar-fcp.c | 6 ++++++
include/media/rcar-fcp.h | 5 +++++
2 files changed, 11 insertions(+)
diff --git a/drivers/media/platform/rcar-fcp.c b/drivers/media/platform/rcar-fcp.c
index e9f609e..2988031 100644
--- a/drivers/media/platform/rcar-fcp.c
+++ b/drivers/media/platform/rcar-fcp.c
@@ -78,6 +78,12 @@ void rcar_fcp_put(struct rcar_fcp_device *fcp)
}
EXPORT_SYMBOL_GPL(rcar_fcp_put);
+struct device *rcar_fcp_get_device(struct rcar_fcp_device *fcp)
+{
+ return fcp->dev;
+}
+EXPORT_SYMBOL_GPL(rcar_fcp_get_device);
+
/**
* rcar_fcp_enable - Enable an FCP
* @fcp: The FCP instance
diff --git a/include/media/rcar-fcp.h b/include/media/rcar-fcp.h
index 8723f05..b60a7b1 100644
--- a/include/media/rcar-fcp.h
+++ b/include/media/rcar-fcp.h
@@ -19,6 +19,7 @@ struct rcar_fcp_device;
#if IS_ENABLED(CONFIG_VIDEO_RENESAS_FCP)
struct rcar_fcp_device *rcar_fcp_get(const struct device_node *np);
void rcar_fcp_put(struct rcar_fcp_device *fcp);
+struct device *rcar_fcp_get_device(struct rcar_fcp_device *fcp);
int rcar_fcp_enable(struct rcar_fcp_device *fcp);
void rcar_fcp_disable(struct rcar_fcp_device *fcp);
#else
@@ -27,6 +28,10 @@ static inline struct rcar_fcp_device *rcar_fcp_get(const struct device_node *np)
return ERR_PTR(-ENOENT);
}
static inline void rcar_fcp_put(struct rcar_fcp_device *fcp) { }
+static inline struct device *rcar_fcp_get_device(struct rcar_fcp_device *fcp)
+{
+ return NULL;
+}
static inline int rcar_fcp_enable(struct rcar_fcp_device *fcp)
{
return 0;
--
2.7.4
next prev parent reply other threads:[~2016-12-09 12:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-09 12:35 [PATCH v1.5 0/6] R-Car DU: Fix IOMMU operation when connected to VSP Ulrich Hecht
2016-12-09 12:35 ` [PATCH v1.5 1/6] v4l: rcar-fcp: Don't get/put module reference Ulrich Hecht
2016-12-09 12:35 ` Ulrich Hecht [this message]
2016-12-09 12:35 ` [PATCH v1.5 3/6] v4l: vsp1: Add API to map and unmap DRM buffers through the VSP Ulrich Hecht
2016-12-09 12:35 ` [PATCH v1.5 4/6] drm: rcar-du: Map memory through the VSP device Ulrich Hecht
2016-12-09 12:35 ` [PATCH v1.5 5/6] v4l: vsp1: Provide display list and VB2 queue with FCP device Ulrich Hecht
2016-12-09 12:35 ` [PATCH v1.5 6/6] arm64: dts: r8a7796: Connect FCP devices to IPMMU Ulrich Hecht
2017-08-30 8:46 ` [PATCH v1.5 0/6] R-Car DU: Fix IOMMU operation when connected to VSP Simon Horman
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=1481286912-16555-3-git-send-email-ulrich.hecht+renesas@gmail.com \
--to=ulrich.hecht+renesas@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.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).