From: Tomi Valkeinen Date: Thu, 19 Dec 2013 10:34:19 +0000 (+0200) Subject: ARM: OMAP2+: DT 'compatible' tweak for displays X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6a0e6b3872f09550bf8e0587d375940092580360;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ARM: OMAP2+: DT 'compatible' tweak for displays As there is no common panel framework in the kernel, we have OMAP specific panel drivers. However, the DT data should be generic. This brings the issue that some other platform could use the same panels, and would need to create a driver with the same 'compatible' string as the OMAP driver. In the long run, we have to get a common panel framework. For the time being, this patch solves the issue: At early boot time, we go through the DT nodes looking for the panels the kernel supports for OMAP. For each found node, the 'compatible' string is prepended with "omapdss,", i.e. "sony,acx565akm" becomes "omapdss,sony,acx565akm". The OMAP display drivers all have "omapdss," at the beginning of their compatible field. This allows us to have generic DT data, but OMAP specific display drivers. Signed-off-by: Tomi Valkeinen Reviewed-by: Archit Taneja Acked-by: Tony Lindgren --- diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index fcb7f5c271c9..0db371a88e5e 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c @@ -35,6 +35,8 @@ static struct of_device_id omap_dt_match_table[] __initdata = { static void __init omap_generic_init(void) { + omapdss_early_init_of(); + pdata_quirks_init(omap_dt_match_table); omapdss_init_of(); diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index 1864282dbddf..d88aff7baff8 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h @@ -316,6 +316,7 @@ extern int omap_dss_reset(struct omap_hwmod *); int omap_clk_init(void); int __init omapdss_init_of(void); +void __init omapdss_early_init_of(void); #endif /* __ASSEMBLER__ */ #endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */ diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c index a83ada38cae2..cf0cb35fa972 100644 --- a/arch/arm/mach-omap2/display.c +++ b/arch/arm/mach-omap2/display.c @@ -25,6 +25,7 @@ #include #include #include +#include #include