From patchwork Mon May 16 08:53:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 787222 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4G8rBtF004644 for ; Mon, 16 May 2011 08:53:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752795Ab1EPIxJ (ORCPT ); Mon, 16 May 2011 04:53:09 -0400 Received: from na3sys009aog103.obsmtp.com ([74.125.149.71]:46829 "EHLO na3sys009aog103.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751915Ab1EPIxI (ORCPT ); Mon, 16 May 2011 04:53:08 -0400 Received: from mail-ew0-f50.google.com ([209.85.215.50]) (using TLSv1) by na3sys009aob103.postini.com ([74.125.148.12]) with SMTP ID DSNKTdDl8nLTA4c2wfuYpoOx19+9oeCkdpbi@postini.com; Mon, 16 May 2011 01:53:08 PDT Received: by ewy10 with SMTP id 10so1314540ewy.9 for ; Mon, 16 May 2011 01:53:05 -0700 (PDT) Received: by 10.213.25.212 with SMTP id a20mr1550856ebc.106.1305535984775; Mon, 16 May 2011 01:53:04 -0700 (PDT) Received: from [192.168.100.101] (a62-248-131-233.elisa-laajakaista.fi [62.248.131.233]) by mx.google.com with ESMTPS id r12sm3277966eeb.4.2011.05.16.01.53.01 (version=SSLv3 cipher=OTHER); Mon, 16 May 2011 01:53:02 -0700 (PDT) Subject: Re: [PATCH 4/6] OMAP: LDP: Port the display driver to new DSS2 From: Tomi Valkeinen To: Igor Grinberg Cc: "Janorkar, Mayuresh" , "tony@atomide.com" , "linux-omap@vger.kernel.org" , Stanley Miao In-Reply-To: <4DCB80DD.5090408@compulab.co.il> References: <1304926567-26814-1-git-send-email-tomi.valkeinen@ti.com> <1304926567-26814-5-git-send-email-tomi.valkeinen@ti.com> <1305095563.2097.11.camel@deskari> <4DCB80DD.5090408@compulab.co.il> Date: Mon, 16 May 2011 11:53:00 +0300 Message-ID: <1305535980.2002.34.camel@deskari> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 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.6 (demeter2.kernel.org [140.211.167.43]); Mon, 16 May 2011 08:53:12 +0000 (UTC) On Thu, 2011-05-12 at 09:40 +0300, Igor Grinberg wrote: > > On 05/11/11 09:32, Tomi Valkeinen wrote: > > > On Wed, 2011-05-11 at 10:28 +0530, Janorkar, Mayuresh wrote: > > > >>> +static void __init ldp_display_init(void) > >>> +{ > >>> + int r; > >>> + > >>> + struct gpio gpios[] = { > >>> + {LCD_PANEL_RESET_GPIO, GPIOF_OUT_INIT_HIGH, "LCD RESET"}, > >>> + {LCD_PANEL_QVGA_GPIO, GPIOF_OUT_INIT_HIGH, "LCD QVGA"}, > >>> + {LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW, "LCD ENABLE"}, > >>> + {LCD_PANEL_BACKLIGHT_GPIO, GPIOF_OUT_INIT_LOW, "LCD > >>> BACKLIGHT"}, > >>> + }; > >>> + > >>> + r = gpio_request_array(gpios, ARRAY_SIZE(gpios)); > >>> + if (r) { > >>> + pr_err("Cannot request LCD GPIOs, error %d\n", r); > >>> + return; > >>> + } > >> If I test with this patch, this request is returning error. > > Hmm. Well, the GPIOs are the same as in the old driver. However, the old > > driver doesn't even seem to check if it manages to request the GPIOs, so > > it may well be that it was failing also. > > > > Can you check from /sys/class/gpio/ if some of the GPIOs are already > > allocated: 207, 199, 55, 56? > > > > The definition of two of those GPIOs look kinda funny to me: (15 + > > OMAP_MAX_GPIO_LINES). I don't know what OMAP_MAX_GPIO_LINES means, but > > it sure doesn't sound ok to have a GPIO number that is 15 over the > > maximum =). > > > > This means that some kind of gpio expander is used. > I bet those are twl gpios (or may be some other discrete chip). > If those are twl gpios then you need to provide the .setup callback > in struct twl4030_gpio_platform_data which will request and setup those gpios. Here's an updated patch with the twl gpio code. All the old omapfb porting patches, including new drivers for DSS2, can be found from git://gitorious.org/linux-omap-dss2/linux.git old-omapfb-port Tomi Signed-off-by: Igor Grinberg --- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index e2ba779..ed78b9a 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c @@ -44,6 +44,9 @@ #include #include +#include