aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/display.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2014-05-15 03:41:34 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-05-28 02:25:15 -0400
commitf2dd36ac9974cc2353bcbb8e6b643fb96030564c (patch)
treefda3f517df2ec8c72dca114ba5688a54b358b3ef /arch/arm/mach-omap2/display.c
parent2b22df835ba42ad6c5f09a52baf68cfb60650f56 (diff)
OMAPDSS: move 'compatible' converter to omapdss driver
Move the panel/encoder driver compatible-string converter from arch/arm/mach-omap2/display.c to omapdss driver. That is a more logical place for it, as it's really an omapdss internal hack. The code is rewritten to follow the video node graph, starting from omapdss. This removes the need to have the device compatible-string database. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/display.c')
-rw-r--r--arch/arm/mach-omap2/display.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index 98e3c59deeab..bf852d7ae951 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -557,66 +557,9 @@ int omap_dss_reset(struct omap_hwmod *oh)
557 return r; 557 return r;
558} 558}
559 559
560/* list of 'compatible' nodes to convert to omapdss specific */
561static const char * const dss_compat_conv_list[] __initconst = {
562 "composite-connector",
563 "dvi-connector",
564 "hdmi-connector",
565 "panel-dpi",
566 "panel-dsi-cm",
567 "sony,acx565akm",
568 "svideo-connector",
569 "ti,tfp410",
570 "ti,tpd12s015",
571 "toppoly,td028ttec1",
572};
573
574/* prepend compatible string with "omapdss," */
575static __init void omapdss_omapify_node(struct device_node *node,
576 const char *compat)
577{
578 char *new_compat;
579 struct property *prop;
580
581 new_compat = kasprintf(GFP_KERNEL, "omapdss,%s", compat);
582
583 prop = kzalloc(sizeof(*prop), GFP_KERNEL);
584
585 if (!prop) {
586 pr_err("omapdss_omapify_node: kzalloc failed\n");
587 return;
588 }
589
590 prop->name = "compatible";
591 prop->value = new_compat;
592 prop->length = strlen(new_compat) + 1;
593
594 of_update_property(node, prop);
595}
596
597/*
598 * As omapdss panel drivers are omapdss specific, but we want to define the
599 * DT-data in generic manner, we convert the compatible strings of the panel
600 * nodes from "panel-foo" to "omapdss,panel-foo". This way we can have both
601 * correct DT data and omapdss specific drivers.
602 *
603 * When we get generic panel drivers to the kernel, this will be removed.
604 */
605void __init omapdss_early_init_of(void) 560void __init omapdss_early_init_of(void)
606{ 561{
607 int i;
608
609 for (i = 0; i < ARRAY_SIZE(dss_compat_conv_list); ++i) {
610 const char *compat = dss_compat_conv_list[i];
611 struct device_node *node = NULL;
612
613 while ((node = of_find_compatible_node(node, NULL, compat))) {
614 if (!of_device_is_available(node))
615 continue;
616 562
617 omapdss_omapify_node(node, compat);
618 }
619 }
620} 563}
621 564
622struct device_node * __init omapdss_find_dss_of_node(void) 565struct device_node * __init omapdss_find_dss_of_node(void)