From: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
To: Maxime Ripard
<maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
David Airlie <airlied-cv59FeDIM0c@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
Cc: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: [PATCH v2 5/9] drm/sun4i: backend: Save pointer to device tree node
Date: Fri, 21 Apr 2017 16:38:53 +0800 [thread overview]
Message-ID: <20170421083857.29636-6-wens@csie.org> (raw)
In-Reply-To: <20170421083857.29636-1-wens-jdAy2FN1RRM@public.gmane.org>
Save a pointer to the backend's underlying device tree node in its
data structure. This will be used later for downstream tcons to find
and match their respective upstream backends.
Signed-off-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
---
drivers/gpu/drm/sun4i/sun4i_backend.c | 1 +
drivers/gpu/drm/sun4i/sun4i_backend.h | 2 ++
2 files changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c
index 0b4222312e49..e9eca057ff35 100644
--- a/drivers/gpu/drm/sun4i/sun4i_backend.c
+++ b/drivers/gpu/drm/sun4i/sun4i_backend.c
@@ -352,6 +352,7 @@ static int sun4i_backend_bind(struct device *dev, struct device *master,
return -ENOMEM;
dev_set_drvdata(dev, backend);
+ backend->node = dev->of_node;
backend->id = sun4i_backend_of_get_id(dev->of_node);
if (backend->id < 0)
return backend->id;
diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.h b/drivers/gpu/drm/sun4i/sun4i_backend.h
index 45b7fc110590..6327a2985fe6 100644
--- a/drivers/gpu/drm/sun4i/sun4i_backend.h
+++ b/drivers/gpu/drm/sun4i/sun4i_backend.h
@@ -15,6 +15,7 @@
#include <linux/clk.h>
#include <linux/list.h>
+#include <linux/of.h>
#include <linux/regmap.h>
#include <linux/reset.h>
@@ -140,6 +141,7 @@
#define SUN4I_BACKEND_PIPE_OFF(p) (0x5000 + (0x400 * (p)))
struct sun4i_backend {
+ struct device_node *node;
struct regmap *regs;
struct reset_control *reset;
--
2.11.0
next prev parent reply other threads:[~2017-04-21 8:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-21 8:38 [PATCH v2 0/9] drm/sun4i: Support multiple display pipelines Chen-Yu Tsai
[not found] ` <20170421083857.29636-1-wens-jdAy2FN1RRM@public.gmane.org>
2017-04-21 8:38 ` [PATCH v2 1/9] dt-bindings: display: sun4i: Add component endpoint ID numbering scheme Chen-Yu Tsai
2017-04-28 13:48 ` Rob Herring
2017-05-02 14:54 ` Maxime Ripard
2017-04-21 8:38 ` [PATCH v2 2/9] drm/sun4i: Use lists to track registered display backends and TCONs Chen-Yu Tsai
2017-04-21 8:38 ` [PATCH v2 3/9] drm/sun4i: backend: Drop trailing 0 from backend in error message Chen-Yu Tsai
2017-04-21 8:38 ` [PATCH v2 4/9] drm/sun4i: backend: Fetch backend ID from device tree Chen-Yu Tsai
2017-04-21 8:38 ` Chen-Yu Tsai [this message]
2017-04-21 8:38 ` [PATCH v2 6/9] drm/sun4i: tcon: Find matching display backend by device node matching Chen-Yu Tsai
2017-04-21 8:38 ` [PATCH v2 7/9] drm/sun4i: tcon: Copy ID from associated backend Chen-Yu Tsai
2017-04-21 8:38 ` [PATCH v2 8/9] ARM: dts: sun6i: Add second display pipeline device nodes Chen-Yu Tsai
2017-04-21 8:38 ` [PATCH v2 9/9] ARM: dts: sun6i: Enable tcon0 by default Chen-Yu Tsai
2017-04-24 5:51 ` [PATCH v2 0/9] drm/sun4i: Support multiple display pipelines Maxime Ripard
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=20170421083857.29636-6-wens@csie.org \
--to=wens-jday2fn1rrm@public.gmane.org \
--cc=airlied-cv59FeDIM0c@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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 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).