From patchwork Wed Feb 13 14:21:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: archit taneja X-Patchwork-Id: 2136651 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 AA492DFE75 for ; Wed, 13 Feb 2013 14:23:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934080Ab3BMOXd (ORCPT ); Wed, 13 Feb 2013 09:23:33 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:56520 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934073Ab3BMOXb (ORCPT ); Wed, 13 Feb 2013 09:23:31 -0500 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id r1DENVhd027120; Wed, 13 Feb 2013 08:23:31 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r1DENVpb009136; Wed, 13 Feb 2013 08:23:31 -0600 Received: from dlelxv24.itg.ti.com (172.17.1.199) by dfle72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.1.323.3; Wed, 13 Feb 2013 08:23:30 -0600 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id r1DENUFB025641; Wed, 13 Feb 2013 08:23:30 -0600 Received: from localhost (a0393947pc.apr.dhcp.ti.com [172.24.137.46]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id r1DENSV16207; Wed, 13 Feb 2013 08:23:29 -0600 (CST) From: Archit Taneja To: CC: , , Archit Taneja , Tony Lindgren Subject: [PATCH 06/33] arm: omap: board-apollon: use generic dpi panel's gpio handling Date: Wed, 13 Feb 2013 19:51:58 +0530 Message-ID: <1360765345-19312-7-git-send-email-archit@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1360765345-19312-1-git-send-email-archit@ti.com> References: <1360765345-19312-1-git-send-email-archit@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The apollon board file currently configures the LCD_PWR_EN gpio by muxing the corresponding pin to gpio 11, and configuring it in PULL UP mode. Remove this muxing from the board file. Add the gpio information to generic dpi panel's platform data so that it's passed to the panel driver. The panel driver will take care of requesting and setting the LCD_PWR_EN gpio. Note: This should be tested to ensure that setting the GPIO is equivalent to configuring the GPIO in PULL UP mode. Also, this GPIO was just set once during init, and never cleared, where as now the gpio will toggle everytime the panel is disabled/enabled. The impact of this needs to be tested. Cc: Tony Lindgren Signed-off-by: Archit Taneja --- arch/arm/mach-omap2/board-apollon.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c index d2a83a8..5cc957e 100644 --- a/arch/arm/mach-omap2/board-apollon.c +++ b/arch/arm/mach-omap2/board-apollon.c @@ -55,6 +55,8 @@ #define APOLLON_ETH_CS 1 #define APOLLON_ETHR_GPIO_IRQ 74 +#define APOLLON_LCD_PWR_EN 11 + static struct mtd_partition apollon_partitions[] = { { .name = "X-Loader + U-Boot", @@ -252,6 +254,10 @@ out: static struct panel_generic_dpi_data apollon_panel_data = { .name = "apollon", + .num_gpios = 1, + .gpios = { + APOLLON_LCD_PWR_EN, + }, }; static struct omap_dss_device apollon_lcd_device = { @@ -306,9 +312,6 @@ static void __init omap_apollon_init(void) /* REVISIT: where's the correct place */ omap_mux_init_signal("sys_nirq", OMAP_PULL_ENA | OMAP_PULL_UP); - /* LCD PWR_EN */ - omap_mux_init_signal("mcbsp2_dr.gpio_11", OMAP_PULL_ENA | OMAP_PULL_UP); - /* Use Internal loop-back in MMC/SDIO Module Input Clock selection */ v = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0); v |= (1 << 24);