From patchwork Fri Jul 20 15:30:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jassi Brar X-Patchwork-Id: 1221521 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 372E0E0038 for ; Fri, 20 Jul 2012 15:32:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753094Ab2GTPck (ORCPT ); Fri, 20 Jul 2012 11:32:40 -0400 Received: from mail-yx0-f174.google.com ([209.85.213.174]:48440 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752192Ab2GTPci (ORCPT ); Fri, 20 Jul 2012 11:32:38 -0400 Received: by yenl2 with SMTP id l2so4093714yen.19 for ; Fri, 20 Jul 2012 08:32:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=NYY4u2ignFbYzemgUrGupRVLKBePVse0ICDOg53vt14=; b=d/HpPtz3ckMD3CxB6ogrM6R9Xz4cbstA9fdrkKDJIZ2ghBpLlsZTRgqpZ/rHyVrUxs wN7OzEiIKs5MVfsGonzIs8rjHOLkVxSBoWa77v0BIz/pYwpDWzlE7nV3jUpIhELZVOuJ eV0HkyOHyn38ntLd88YCKJqSPy7lVQR9VJV990rUE7yEE5VL51WUR6xei1KGK3YmeIoH D+4UYiD7EXGLy3SVMIQl298yTRqBfBHcQ0jbf614TaneZ3gSM7J0QhsgFJzL0ccJQAd+ c9UwNm9GdJ1BKrmvjFLF7WcPRm1EeMEaVo9qVqCUOUhI+WqHm8WG12PZt0xzwJO/64HY IaQg== Received: by 10.66.81.3 with SMTP id v3mr12144577pax.62.1342798357591; Fri, 20 Jul 2012 08:32:37 -0700 (PDT) Received: from localhost.localdomain ([122.167.214.219]) by mx.google.com with ESMTPS id sy3sm4168432pbc.18.2012.07.20.08.32.34 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 20 Jul 2012 08:32:36 -0700 (PDT) From: Jassi Brar To: tomi.valkeinen@ti.com, a0393947@ti.com Cc: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, Jassi Brar Subject: [PATCH] OMAPDSS: DPI: Get panel configuration from platform data Date: Fri, 20 Jul 2012 21:00:19 +0530 Message-Id: <1342798219-13031-1-git-send-email-jaswinder.singh@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQniCmowB2VJzhiACZCC2qktzW5//x9m1Os+LWjexgNaF9cr9Nra/rwEvMX8gq+rIzm8M59g Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Instead of harcoding in the driver some of potentially countless sets of parameters that could define a panel, have the board provide the parameters to the panel driver. Signed-off-by: Jassi Brar --- arch/arm/mach-omap2/board-2430sdp.c | 4 +- arch/arm/mach-omap2/board-am3517evm.c | 5 +- arch/arm/mach-omap2/board-apollon.c | 4 +- arch/arm/mach-omap2/board-cm-t35.c | 5 +- arch/arm/mach-omap2/board-devkit8000.c | 4 +- arch/arm/mach-omap2/board-h4.c | 3 +- arch/arm/mach-omap2/board-ldp.c | 4 +- arch/arm/mach-omap2/board-overo.c | 4 +- drivers/video/omap2/displays/panel-generic-dpi.c | 467 +--------------------- include/video/omap-panel-generic-dpi.h | 15 +- 10 files changed, 44 insertions(+), 471 deletions(-) diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c index 99ca6ba..0cc58c3 100644 --- a/arch/arm/mach-omap2/board-2430sdp.c +++ b/arch/arm/mach-omap2/board-2430sdp.c @@ -125,7 +125,9 @@ static void sdp2430_panel_disable_lcd(struct omap_dss_device *dssdev) } static struct panel_generic_dpi_data sdp2430_panel_data = { - .name = "nec_nl2432dr22-11b", + .pcfg = {{240, 320, 5400, 3, 3, 39, 1, 2, 7,}, 0, 0, + (OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | OMAP_DSS_LCD_IHS), + 0, 0,}, .platform_enable = sdp2430_panel_enable_lcd, .platform_disable = sdp2430_panel_disable_lcd, }; diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index 18f6010..afd87b5 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c @@ -176,7 +176,10 @@ static void am3517_evm_panel_disable_lcd(struct omap_dss_device *dssdev) } static struct panel_generic_dpi_data lcd_panel = { - .name = "sharp_lq", + .pcfg = {{480, 272, 9000, 42, 3, 2, 11, 3, 2,}, 0, 0, + (OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | + OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IEO), + 50, 100,}, .platform_enable = am3517_evm_panel_enable_lcd, .platform_disable = am3517_evm_panel_disable_lcd, }; diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c index 502c31e..e9c6f5a 100644 --- a/arch/arm/mach-omap2/board-apollon.c +++ b/arch/arm/mach-omap2/board-apollon.c @@ -261,7 +261,9 @@ static struct omap_usb_config apollon_usb_config __initdata = { }; static struct panel_generic_dpi_data apollon_panel_data = { - .name = "apollon", + .pcfg = {{480, 272, 6250, 41, 2, 2, 10, 2, 2,}, 0, 0, + (OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | OMAP_DSS_LCD_IHS), + 0, 0,}, }; static struct omap_dss_device apollon_lcd_device = { diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index ded100c..f5a8ce4 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c @@ -228,7 +228,10 @@ static void cm_t35_panel_disable_tv(struct omap_dss_device *dssdev) } static struct panel_generic_dpi_data lcd_panel = { - .name = "toppoly_tdo35s", + .pcfg = {{480, 640, 26000, 8, 104, 8, 2, 4, 2,}, 0, 0, + (OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | OMAP_DSS_LCD_IHS | + OMAP_DSS_LCD_IPC | OMAP_DSS_LCD_ONOFF), + 0, 0,}, .platform_enable = cm_t35_panel_enable_lcd, .platform_disable = cm_t35_panel_disable_lcd, }; diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index 6567c1c..397f52d 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c @@ -128,7 +128,9 @@ static struct regulator_consumer_supply devkit8000_vio_supply[] = { }; static struct panel_generic_dpi_data lcd_panel = { - .name = "innolux_at070tn83", + .pcfg = {{800, 480, 40000, 48, 1, 1, 3, 12, 25,}, 0, 0x28, + (OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | OMAP_DSS_LCD_IHS), + 0, 0,}, .platform_enable = devkit8000_panel_enable_lcd, .platform_disable = devkit8000_panel_disable_lcd, }; diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 876becf..4f62bad 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c @@ -205,7 +205,8 @@ static struct platform_device *h4_devices[] __initdata = { }; static struct panel_generic_dpi_data h4_panel_data = { - .name = "h4", + .pcfg = {{240, 320, 6250, 15, 15, 60, 1, 1, 1,}, 0, 0, + OMAP_DSS_LCD_TFT, 0, 0,}, }; static struct omap_dss_device h4_lcd_device = { diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index ef9e829..de797920 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c @@ -210,7 +210,9 @@ static void ldp_panel_disable_lcd(struct omap_dss_device *dssdev) } static struct panel_generic_dpi_data ldp_panel_data = { - .name = "nec_nl2432dr22-11b", + .pcfg = {{240, 320, 5400, 3, 3, 39, 1, 2, 7,}, 0, 0, + (OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | OMAP_DSS_LCD_IHS), + 0, 0,}, .platform_enable = ldp_panel_enable_lcd, .platform_disable = ldp_panel_disable_lcd, }; diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index 779734d..4f7a9fb5 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c @@ -208,7 +208,9 @@ static void overo_panel_disable_lcd(struct omap_dss_device *dssdev) } static struct panel_generic_dpi_data lcd43_panel = { - .name = "samsung_lte430wq_f0c", + .pcfg = {{480, 272, 9200, 41, 8, 4, 10, 4, 2,}, 0, 0, + (OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | OMAP_DSS_LCD_IHS), + 0, 0,}, .platform_enable = overo_panel_enable_lcd, .platform_disable = overo_panel_disable_lcd, }; diff --git a/drivers/video/omap2/displays/panel-generic-dpi.c b/drivers/video/omap2/displays/panel-generic-dpi.c index e42f9dc..6fa5e22 100644 --- a/drivers/video/omap2/displays/panel-generic-dpi.c +++ b/drivers/video/omap2/displays/panel-generic-dpi.c @@ -37,457 +37,6 @@ #include