From patchwork Thu Nov 25 15:52:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srikar X-Patchwork-Id: 357042 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAPFrZHU021914 for ; Thu, 25 Nov 2010 15:53:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753280Ab0KYPxd (ORCPT ); Thu, 25 Nov 2010 10:53:33 -0500 Received: from smtp.nokia.com ([147.243.1.47]:54056 "EHLO mgw-sa01.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752989Ab0KYPxc (ORCPT ); Thu, 25 Nov 2010 10:53:32 -0500 Received: from nokia.com (localhost [127.0.0.1]) by mgw-sa01.nokia.com (Switch-3.4.3/Switch-3.4.3) with ESMTP id oAPFrP4e010424; Thu, 25 Nov 2010 17:53:25 +0200 Received: from srikar.research.nokia.com ([helruo-dhcp022101.ntc.nokia.com [172.21.22.101]]) by mgw-sa01.nokia.com with RELAY id oAPFr6v5009889 ; Thu, 25 Nov 2010 17:53:07 +0200 From: Srikar To: tony@atomide.com, linux@arm.linux.org.uk, linux-omap@vger.kernel.org Cc: Srikar Subject: [PATCH 1/2] Added video data to support tvout on rx51 Date: Thu, 25 Nov 2010 17:52:22 +0200 Message-Id: <1290700343-26640-1-git-send-email-ext-srikar.1.bhavanarayana@nokia.com> X-Mailer: git-send-email 1.7.1 X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 25 Nov 2010 15:53:36 +0000 (UTC) diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c index 85503fe..9919581 100644 --- a/arch/arm/mach-omap2/board-rx51-video.c +++ b/arch/arm/mach-omap2/board-rx51-video.c @@ -14,7 +14,6 @@ #include #include #include - #include #include #include @@ -25,6 +24,9 @@ #include "mux.h" #define RX51_LCD_RESET_GPIO 90 +/* REVISIT to verify with rx51.c at sound/soc/omap */ +#define RX51_TVOUT_SEL_GPIO 40 + #if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) @@ -39,6 +41,17 @@ static void rx51_lcd_disable(struct omap_dss_device *dssdev) gpio_set_value(dssdev->reset_gpio, 0); } +static int rx51_tvout_enable(struct omap_dss_device *dssdev) +{ + gpio_set_value(dssdev->reset_gpio, 1); + return 0; +} + +static void rx51_tvout_disable(struct omap_dss_device *dssdev) +{ + gpio_set_value(dssdev->reset_gpio, 0); +} + static struct omap_dss_device rx51_lcd_device = { .name = "lcd", .driver_name = "panel-acx565akm", @@ -49,8 +62,19 @@ static struct omap_dss_device rx51_lcd_device = { .platform_disable = rx51_lcd_disable, }; +static struct omap_dss_device rx51_tv_device = { + .name = "tv", + .type = OMAP_DISPLAY_TYPE_VENC, + .driver_name = "venc", + .phy.venc.type = OMAP_DSS_VENC_TYPE_COMPOSITE, + .reset_gpio = RX51_TVOUT_SEL_GPIO, + .platform_enable = rx51_tvout_enable, + .platform_disable = rx51_tvout_disable, +}; + static struct omap_dss_device *rx51_dss_devices[] = { &rx51_lcd_device, + &rx51_tv_device, }; static struct omap_dss_board_info rx51_dss_board_info = { @@ -88,6 +112,9 @@ static int __init rx51_video_init(void) gpio_direction_output(RX51_LCD_RESET_GPIO, 1); + /* REVISIT to verify with rx51.c at sound/soc/omap */ + gpio_direction_output(RX51_TVOUT_SEL_GPIO, 1); + platform_add_devices(rx51_video_devices, ARRAY_SIZE(rx51_video_devices)); return 0;