summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/sun4i/sun4i_tcon.h
diff options
context:
space:
mode:
authorChen-Yu Tsai <wens@csie.org>2016-10-20 11:43:39 +0800
committerMaxime Ripard <maxime.ripard@free-electrons.com>2016-10-20 17:58:33 +0200
commit91ea2f29cba6a7fe035ea232e4f981211a9fce5d (patch)
tree9a9bdf552a8f53783c8d6aa5c303bbd2b4bb57e6 /drivers/gpu/drm/sun4i/sun4i_tcon.h
parentb3e0b2dba870cc2f1d614a0f04459c18d8bf71a3 (diff)
downloadop-kernel-dev-91ea2f29cba6a7fe035ea232e4f981211a9fce5d.zip
op-kernel-dev-91ea2f29cba6a7fe035ea232e4f981211a9fce5d.tar.gz
drm/sun4i: tcon: Move SoC specific quirks to a DT matched data structure
We already have some differences between the 2 supported SoCs. More will be added as we support other SoCs. To avoid bloating the probe function with even more conditionals, move the quirks to a separate data structure that's tied to the compatible string. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Diffstat (limited to 'drivers/gpu/drm/sun4i/sun4i_tcon.h')
-rw-r--r--drivers/gpu/drm/sun4i/sun4i_tcon.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.h b/drivers/gpu/drm/sun4i/sun4i_tcon.h
index 12bd489..166064b 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.h
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.h
@@ -142,6 +142,11 @@
#define SUN4I_TCON_MAX_CHANNELS 2
+struct sun4i_tcon_quirks {
+ bool has_unknown_mux; /* sun5i has undocumented mux */
+ bool has_channel_1; /* a33 does not have channel 1 */
+};
+
struct sun4i_tcon {
struct device *dev;
struct drm_device *drm;
@@ -160,12 +165,10 @@ struct sun4i_tcon {
/* Reset control */
struct reset_control *lcd_rst;
- /* Platform adjustments */
- bool has_mux;
-
struct drm_panel *panel;
- bool has_channel_1;
+ /* Platform adjustments */
+ const struct sun4i_tcon_quirks *quirks;
};
struct drm_bridge *sun4i_tcon_find_bridge(struct device_node *node);
OpenPOWER on IntegriCloud