From patchwork Thu Apr 24 12:28:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 28967 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f72.google.com (mail-qg0-f72.google.com [209.85.192.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BD7E0203AC for ; Thu, 24 Apr 2014 12:29:51 +0000 (UTC) Received: by mail-qg0-f72.google.com with SMTP id q108sf5490993qgd.3 for ; Thu, 24 Apr 2014 05:29:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=MA8y5W9BArhg0r8Tv+Vun1VvYSqJX5zwdDr7GzGeEqI=; b=Vx3BD1d6V31Nitqp6sam8yQgIxNz/fNNoNRLhKx3tkfZkOrBhijgpt+l0xslktE/db anI54CIVR6EQekOOlsdljC0I//aZpNlQmtrQz0kC6/u+emeHaJbGEJYKKVwbDmknxZZQ 7TwObuxu5dEQX/prTcgUfoCF2KD/Lfrg6CdZhlYTZ/F9N0IOEfgxWgOLAiJ/BVigTTMf D0w6g0pOY/Wyxu9wC0V7EG6OKInxVn5xEM18C9kJbfo1YL0O9kB9iYAlUP3+2AEFnBKo 97yneoKTKdI5N+fpPlfaJrHTYmDp88VBnm+mhmyj5iSGBVB+Jm+xIz1ifJ6WgraJwD8Z Ba6A== X-Gm-Message-State: ALoCoQmi4NNCLJozSHH+vFRyZIMFWg+SZKBioU13aacyJ7W4cLDfzGMe9s1XswhV2CnR0onzLLYc X-Received: by 10.236.39.99 with SMTP id c63mr27917642yhb.31.1398342591284; Thu, 24 Apr 2014 05:29:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.49.179 with SMTP id q48ls1101447qga.21.gmail; Thu, 24 Apr 2014 05:29:51 -0700 (PDT) X-Received: by 10.221.36.73 with SMTP id sz9mr50140vcb.62.1398342591167; Thu, 24 Apr 2014 05:29:51 -0700 (PDT) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by mx.google.com with ESMTPS id tv3si874056vdc.180.2014.04.24.05.29.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 24 Apr 2014 05:29:51 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.128.174; Received: by mail-ve0-f174.google.com with SMTP id oz11so2746912veb.19 for ; Thu, 24 Apr 2014 05:29:51 -0700 (PDT) X-Received: by 10.52.249.105 with SMTP id yt9mr898587vdc.34.1398342591074; Thu, 24 Apr 2014 05:29:51 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp11913vcb; Thu, 24 Apr 2014 05:29:48 -0700 (PDT) X-Received: by 10.69.31.235 with SMTP id kp11mr65530844pbd.33.1398342587515; Thu, 24 Apr 2014 05:29:47 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ps1si2581342pbc.379.2014.04.24.05.29.47; Thu, 24 Apr 2014 05:29:47 -0700 (PDT) Received-SPF: none (google.com: linux-fbdev-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757087AbaDXM3a (ORCPT + 1 other); Thu, 24 Apr 2014 08:29:30 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:40334 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757045AbaDXM3F (ORCPT ); Thu, 24 Apr 2014 08:29:05 -0400 Received: by mail-wi0-f170.google.com with SMTP id bs8so1129263wib.1 for ; Thu, 24 Apr 2014 05:29:04 -0700 (PDT) X-Received: by 10.180.20.111 with SMTP id m15mr6131554wie.59.1398342544280; Thu, 24 Apr 2014 05:29:04 -0700 (PDT) Received: from localhost.localdomain (cpc14-aztw22-2-0-cust189.18-1.cable.virginm.net. [82.45.1.190]) by mx.google.com with ESMTPSA id y20sm35144777wiv.14.2014.04.24.05.29.03 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 24 Apr 2014 05:29:03 -0700 (PDT) From: Peter Griffin To: linux-kernel@vger.kernel.org Cc: linaro-kernel@lists.linaro.org, Arnd Bergmann , Peter Griffin , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org Subject: [PATCH 04/13] video/omap: fix modular build Date: Thu, 24 Apr 2014 13:28:20 +0100 Message-Id: <1398342509-10243-5-git-send-email-peter.griffin@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398342509-10243-1-git-send-email-peter.griffin@linaro.org> References: <1398342509-10243-1-git-send-email-peter.griffin@linaro.org> Sender: linux-fbdev-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.griffin@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Arnd Bergmann The framebuffer layer can be a loadable module, which forces omapfb to be a module as well. However, this breaks the lcd drivers, which are linked into the omapfb driver but each have their own module_init() function. To solve this, we split out the lcd drivers into separate modules and export omapfb_register_panel, which is the only interface required between the main omapfb driver and the lcd panel drivers. We also have to introduce a new Kconfig symbol for H3, since that lcd driver has a dependency on TPS65010, which we can express better in Kconfig than Makefile syntax. Signed-off-by: Arnd Bergmann Signed-off-by: Peter Griffin Cc: Jean-Christophe Plagniol-Villard Cc: Tomi Valkeinen Cc: linux-fbdev@vger.kernel.org Cc: linux-omap@vger.kernel.org --- drivers/video/fbdev/omap/Kconfig | 9 +++++++++ drivers/video/fbdev/omap/Makefile | 23 ++++++++++++----------- drivers/video/fbdev/omap/omapfb_main.c | 1 + include/linux/omap-dma.h | 2 +- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/drivers/video/fbdev/omap/Kconfig b/drivers/video/fbdev/omap/Kconfig index 0bc3a93..18c4cb0 100644 --- a/drivers/video/fbdev/omap/Kconfig +++ b/drivers/video/fbdev/omap/Kconfig @@ -39,6 +39,15 @@ config FB_OMAP_LCD_MIPID the Mobile Industry Processor Interface DBI-C/DCS specification. (Supported LCDs: Philips LPH8923, Sharp LS041Y3) +config FB_OMAP_LCD_H3 + bool "TPS65010 LCD controller on OMAP-H3" + depends on MACH_OMAP_H3 + depends on TPS65010 + default y + help + Say Y here if you want to have support for the LCD on the + H3 board. + config FB_OMAP_DMA_TUNE bool "Set DMA SDRAM access priority high" depends on FB_OMAP diff --git a/drivers/video/fbdev/omap/Makefile b/drivers/video/fbdev/omap/Makefile index 1927faf..732e071 100644 --- a/drivers/video/fbdev/omap/Makefile +++ b/drivers/video/fbdev/omap/Makefile @@ -10,17 +10,18 @@ objs-y$(CONFIG_FB_OMAP_LCDC_EXTERNAL) += sossi.o objs-y$(CONFIG_FB_OMAP_LCDC_HWA742) += hwa742.o -objs-y$(CONFIG_MACH_AMS_DELTA) += lcd_ams_delta.o -objs-y$(CONFIG_MACH_OMAP_H3) += lcd_h3.o -objs-y$(CONFIG_MACH_OMAP_PALMTE) += lcd_palmte.o -objs-y$(CONFIG_MACH_OMAP_PALMTT) += lcd_palmtt.o -objs-y$(CONFIG_MACH_OMAP_PALMZ71) += lcd_palmz71.o -objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1610.o -objs-$(CONFIG_ARCH_OMAP15XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1510.o -objs-y$(CONFIG_MACH_OMAP_OSK) += lcd_osk.o - -objs-y$(CONFIG_FB_OMAP_LCD_MIPID) += lcd_mipid.o -objs-y$(CONFIG_MACH_HERALD) += lcd_htcherald.o +lcds-y$(CONFIG_MACH_AMS_DELTA) += lcd_ams_delta.o +lcds-y$(CONFIG_FB_OMAP_LCD_H3) += lcd_h3.o +lcds-y$(CONFIG_MACH_OMAP_PALMTE) += lcd_palmte.o +lcds-y$(CONFIG_MACH_OMAP_PALMTT) += lcd_palmtt.o +lcds-y$(CONFIG_MACH_OMAP_PALMZ71) += lcd_palmz71.o +lcds-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1610.o +lcds-$(CONFIG_ARCH_OMAP15XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1510.o +lcds-y$(CONFIG_MACH_OMAP_OSK) += lcd_osk.o + +lcds-y$(CONFIG_FB_OMAP_LCD_MIPID) += lcd_mipid.o +lcds-y$(CONFIG_MACH_HERALD) += lcd_htcherald.o omapfb-objs := $(objs-yy) +obj-$(CONFIG_FB_OMAP) += $(lcds-yy) diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c index e4fc6d9..d8d028d 100644 --- a/drivers/video/fbdev/omap/omapfb_main.c +++ b/drivers/video/fbdev/omap/omapfb_main.c @@ -1823,6 +1823,7 @@ void omapfb_register_panel(struct lcd_panel *panel) if (fbdev_pdev != NULL) omapfb_do_probe(fbdev_pdev, fbdev_panel); } +EXPORT_SYMBOL_GPL(omapfb_register_panel); /* Called when the device is being detached from the driver */ static int omapfb_remove(struct platform_device *pdev) diff --git a/include/linux/omap-dma.h b/include/linux/omap-dma.h index 41a13e7..0a1a2e2 100644 --- a/include/linux/omap-dma.h +++ b/include/linux/omap-dma.h @@ -393,7 +393,7 @@ extern int omap_modify_dma_chain_params(int chain_id, extern int omap_dma_chain_status(int chain_id); #endif -#if defined(CONFIG_ARCH_OMAP1) && defined(CONFIG_FB_OMAP) +#if defined(CONFIG_ARCH_OMAP1) && IS_ENABLED(CONFIG_FB_OMAP) #include #else static inline int omap_lcd_dma_running(void)