From patchwork Wed Apr 23 17:28:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 28917 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f200.google.com (mail-ie0-f200.google.com [209.85.223.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 416C7203AC for ; Wed, 23 Apr 2014 17:29:02 +0000 (UTC) Received: by mail-ie0-f200.google.com with SMTP id lx4sf7309172iec.7 for ; Wed, 23 Apr 2014 10:29:01 -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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=bRF9zZvAKzeqZiqpIEbCIcSmte8mFtZETa9sSpMu8do=; b=XkP6pQhk9VZKFk/zFCqeZ5CSL7k3uvnOPlH5qUrvzfvBcOsgLouokP6Qcfg1PCwpea Okoxxi3h2JkJIPvZHrhcwNiiKswb1Ph94KHf+tk9TYkrBebAd/lr6rLTPIyKk6kGlmbG a5YHc3LM2OErpTIGAZ3k85F+5f6bZFurjH6CwxhIFXHNlb04WJuz4X7I5d+kgyCqVKcG ahVvoHHDlDzgWzD6GGyBSnf2Jb8WV+P5ZFNyOvAlGgeM55ml0hXUAZxd/s1aythEl6M3 Ks0pt8RBSqY6eD81aALZbH8qlwWGqs/N0lUgXPOlQHchrAXYGefCZ3o78hLlWuV3xrJp 3XCQ== X-Gm-Message-State: ALoCoQmQf3SubeejmqULrV9+mBfd+SDQvUrigKDx7XgnKNeN5d/X8Fux+yY+ypXqLfdVCL8jyzFf X-Received: by 10.43.88.73 with SMTP id az9mr21860603icc.5.1398274141626; Wed, 23 Apr 2014 10:29:01 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.27.38 with SMTP id 35ls705772qgw.77.gmail; Wed, 23 Apr 2014 10:29:01 -0700 (PDT) X-Received: by 10.220.12.66 with SMTP id w2mr41294358vcw.15.1398274141526; Wed, 23 Apr 2014 10:29:01 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id pd4si304374veb.105.2014.04.23.10.29.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Apr 2014 10:29:01 -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.175; Received: by mail-ve0-f175.google.com with SMTP id oz11so1505841veb.34 for ; Wed, 23 Apr 2014 10:29:01 -0700 (PDT) X-Received: by 10.220.191.134 with SMTP id dm6mr42599683vcb.16.1398274141419; Wed, 23 Apr 2014 10:29:01 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp120700vcb; Wed, 23 Apr 2014 10:29:00 -0700 (PDT) X-Received: by 10.194.48.100 with SMTP id k4mr3429137wjn.49.1398274138940; Wed, 23 Apr 2014 10:28:58 -0700 (PDT) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id cx10si1597532wib.0.2014.04.23.10.28.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Apr 2014 10:28:58 -0700 (PDT) Received-SPF: none (google.com: peter.griffin@linaro.org does not designate permitted sender hosts) client-ip=74.125.82.50; Received: by mail-wg0-f50.google.com with SMTP id x13so1192539wgg.9 for ; Wed, 23 Apr 2014 10:28:58 -0700 (PDT) X-Received: by 10.180.21.180 with SMTP id w20mr2791215wie.34.1398274138258; Wed, 23 Apr 2014 10:28:58 -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 go20sm2372382wjc.18.2014.04.23.10.28.57 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Apr 2014 10:28:57 -0700 (PDT) From: Peter Griffin To: peter.griffin@linaro.org Cc: patches@linaro.org, linaro-kernel@lists.linaro.org Subject: [PATCH 04/13] video/omap: fix modular build Date: Wed, 23 Apr 2014 18:28:38 +0100 Message-Id: <1398274127-2106-4-git-send-email-peter.griffin@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398274127-2106-1-git-send-email-peter.griffin@linaro.org> References: <1398274127-2106-1-git-send-email-peter.griffin@linaro.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 Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: 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)