Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1628058
| From | Chen-Yu Tsai <wens@csie.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 5/9] drm/sun4i: backend: Save pointer to device tree node |
| Date | 2017-04-21 10:50 +0200 |
| Message-ID | <tyCql-3El-11@gated-at.bofh.it> (permalink) |
| References | <tyCgF-3B2-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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@csie.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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/9] drm/sun4i: Support multiple display pipelines Chen-Yu Tsai <wens@csie.org> - 2017-04-21 10:40 +0200 [PATCH v2 1/9] dt-bindings: display: sun4i: Add component endpoint ID numbering scheme Chen-Yu Tsai <wens@csie.org> - 2017-04-21 10:40 +0200 [PATCH v2 9/9] ARM: dts: sun6i: Enable tcon0 by default Chen-Yu Tsai <wens@csie.org> - 2017-04-21 10:40 +0200 [PATCH v2 7/9] drm/sun4i: tcon: Copy ID from associated backend Chen-Yu Tsai <wens@csie.org> - 2017-04-21 10:40 +0200 [PATCH v2 5/9] drm/sun4i: backend: Save pointer to device tree node Chen-Yu Tsai <wens@csie.org> - 2017-04-21 10:50 +0200 [PATCH v2 4/9] drm/sun4i: backend: Fetch backend ID from device tree Chen-Yu Tsai <wens@csie.org> - 2017-04-21 10:50 +0200 [PATCH v2 3/9] drm/sun4i: backend: Drop trailing 0 from backend in error message Chen-Yu Tsai <wens@csie.org> - 2017-04-21 10:50 +0200 [PATCH v2 8/9] ARM: dts: sun6i: Add second display pipeline device nodes Chen-Yu Tsai <wens@csie.org> - 2017-04-21 10:50 +0200 [PATCH v2 6/9] drm/sun4i: tcon: Find matching display backend by device node matching Chen-Yu Tsai <wens@csie.org> - 2017-04-21 10:50 +0200 [PATCH v2 2/9] drm/sun4i: Use lists to track registered display backends and TCONs Chen-Yu Tsai <wens@csie.org> - 2017-04-21 10:50 +0200 Re: [PATCH v2 0/9] drm/sun4i: Support multiple display pipelines Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-04-24 08:00 +0200
csiph-web