From patchwork Tue Jan 21 10:56:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 3516361 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2FDC49F2E9 for ; Tue, 21 Jan 2014 10:59:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 06C8C2015A for ; Tue, 21 Jan 2014 10:59:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AD6C420148 for ; Tue, 21 Jan 2014 10:59:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754250AbaAUK7P (ORCPT ); Tue, 21 Jan 2014 05:59:15 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:33363 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754091AbaAUK7K (ORCPT ); Tue, 21 Jan 2014 05:59:10 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s0LAwUq5024619; Tue, 21 Jan 2014 04:58:30 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s0LAwTZa012221; Tue, 21 Jan 2014 04:58:29 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.2.342.3; Tue, 21 Jan 2014 04:58:29 -0600 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s0LAwGVk019193; Tue, 21 Jan 2014 04:58:25 -0600 From: Tomi Valkeinen To: , , , CC: Archit Taneja , Darren Etheridge , Tony Lindgren , Laurent Pinchart , Stefan Roese , Sebastian Reichel , Robert Nelson , "Dr . H . Nikolaus Schaller" , Marek Belisko , Sebastian Reichel , Javier Martinez Canillas , Enric Balletbo Serra , Florian Vaussard , Tomi Valkeinen Subject: [PATCHv3 02/41] ARM: OMAP2+: DT 'compatible' tweak for displays Date: Tue, 21 Jan 2014 12:56:34 +0200 Message-ID: <1390301833-24944-3-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1390301833-24944-1-git-send-email-tomi.valkeinen@ti.com> References: <1390301833-24944-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- arch/arm/mach-omap2/board-generic.c | 2 ++ arch/arm/mach-omap2/common.h | 1 + arch/arm/mach-omap2/display.c | 56 +++++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+) diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 842e4f21ab09..08921d0d63d4 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 04a4d360dd20..e21702e2e82e 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h @@ -308,6 +308,7 @@ extern int omap_dss_reset(struct omap_hwmod *); extern 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 77cd927e5acb..9a729bd3d28b 100644 --- a/arch/arm/mach-omap2/display.c +++ b/arch/arm/mach-omap2/display.c @@ -25,6 +25,7 @@ #include #include #include +#include #include