diff options
author | Chen-Yu Tsai <wens@csie.org> | 2017-04-21 04:38:53 -0400 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2017-05-14 02:27:41 -0400 |
commit | 2c03e2fb063f33694e35bbade6d9186274b9a02f (patch) | |
tree | b607b9001396ee6e0e2a5b4f14b98e0747f9cc8f | |
parent | da3a1c30dc10858b39a759432d8141f42b8529e8 (diff) |
drm/sun4i: backend: Save pointer to device tree node
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>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
-rw-r--r-- | drivers/gpu/drm/sun4i/sun4i_backend.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/sun4i/sun4i_backend.h | 2 |
2 files changed, 3 insertions, 0 deletions
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, | |||
352 | return -ENOMEM; | 352 | return -ENOMEM; |
353 | dev_set_drvdata(dev, backend); | 353 | dev_set_drvdata(dev, backend); |
354 | 354 | ||
355 | backend->node = dev->of_node; | ||
355 | backend->id = sun4i_backend_of_get_id(dev->of_node); | 356 | backend->id = sun4i_backend_of_get_id(dev->of_node); |
356 | if (backend->id < 0) | 357 | if (backend->id < 0) |
357 | return backend->id; | 358 | 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 @@ | |||
15 | 15 | ||
16 | #include <linux/clk.h> | 16 | #include <linux/clk.h> |
17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
18 | #include <linux/of.h> | ||
18 | #include <linux/regmap.h> | 19 | #include <linux/regmap.h> |
19 | #include <linux/reset.h> | 20 | #include <linux/reset.h> |
20 | 21 | ||
@@ -140,6 +141,7 @@ | |||
140 | #define SUN4I_BACKEND_PIPE_OFF(p) (0x5000 + (0x400 * (p))) | 141 | #define SUN4I_BACKEND_PIPE_OFF(p) (0x5000 + (0x400 * (p))) |
141 | 142 | ||
142 | struct sun4i_backend { | 143 | struct sun4i_backend { |
144 | struct device_node *node; | ||
143 | struct regmap *regs; | 145 | struct regmap *regs; |
144 | 146 | ||
145 | struct reset_control *reset; | 147 | struct reset_control *reset; |