All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
To: dri-devel@lists.freedesktop.org
Cc: linux-renesas-soc@vger.kernel.org
Subject: [PATCH v2 2/5] v4l: rcar-fcp: Add an API to retrieve the FCP device
Date: Wed, 17 May 2017 02:20:04 +0300	[thread overview]
Message-ID: <20170516232007.20980-3-laurent.pinchart+renesas@ideasonboard.com> (raw)
In-Reply-To: <20170516232007.20980-1-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 e9f609edf513..2988031d285d 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 8723f05c6321..b60a7b176c37 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;
-- 
Regards,

Laurent Pinchart

  parent reply	other threads:[~2017-05-16 23:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-16 23:20 [PATCH v2 0/5] R-Car DU: Fix IOMMU operation when connected to VSP Laurent Pinchart
2017-05-16 23:20 ` [PATCH v2 1/5] v4l: rcar-fcp: Don't get/put module reference Laurent Pinchart
2017-05-16 23:20   ` Laurent Pinchart
2017-05-22 11:36   ` Kieran Bingham
2017-05-16 23:20 ` Laurent Pinchart [this message]
2017-05-22 11:44   ` [PATCH v2 2/5] v4l: rcar-fcp: Add an API to retrieve the FCP device Kieran Bingham
2017-05-16 23:20 ` [PATCH v2 3/5] v4l: vsp1: Map the DL and video buffers through the proper bus master Laurent Pinchart
2017-05-22 11:47   ` Kieran Bingham
2017-05-16 23:20 ` [PATCH v2 4/5] v4l: vsp1: Add API to map and unmap DRM buffers through the VSP Laurent Pinchart
2017-05-22 11:52   ` Kieran Bingham
2017-05-16 23:20 ` [PATCH v2 5/5] drm: rcar-du: Map memory through the VSP device Laurent Pinchart
2017-05-22 12:15   ` Kieran Bingham
2017-05-22 12:16   ` Kieran Bingham
2017-05-22 12:24     ` Laurent Pinchart
2017-05-22 12:52       ` Kieran Bingham
2017-05-22 13:00         ` Geert Uytterhoeven
2017-05-22 13:23           ` Laurent Pinchart
2017-05-22 13:40             ` Kieran Bingham

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=20170516232007.20980-3-laurent.pinchart+renesas@ideasonboard.com \
    --to=laurent.pinchart+renesas@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.