Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

video/omap: fix modular build

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 <arnd@arndb.de>
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-fbdev@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

authored by

Arnd Bergmann and committed by
Tomi Valkeinen
81c44c2b f7200b68

+22 -11
+9
drivers/video/fbdev/omap/Kconfig
··· 39 39 the Mobile Industry Processor Interface DBI-C/DCS 40 40 specification. (Supported LCDs: Philips LPH8923, Sharp LS041Y3) 41 41 42 + config FB_OMAP_LCD_H3 43 + bool "TPS65010 LCD controller on OMAP-H3" 44 + depends on MACH_OMAP_H3 45 + depends on TPS65010 46 + default y 47 + help 48 + Say Y here if you want to have support for the LCD on the 49 + H3 board. 50 + 42 51 config FB_OMAP_DMA_TUNE 43 52 bool "Set DMA SDRAM access priority high" 44 53 depends on FB_OMAP
+11 -10
drivers/video/fbdev/omap/Makefile
··· 10 10 11 11 objs-y$(CONFIG_FB_OMAP_LCDC_HWA742) += hwa742.o 12 12 13 - objs-y$(CONFIG_MACH_AMS_DELTA) += lcd_ams_delta.o 14 - objs-y$(CONFIG_MACH_OMAP_H3) += lcd_h3.o 15 - objs-y$(CONFIG_MACH_OMAP_PALMTE) += lcd_palmte.o 16 - objs-y$(CONFIG_MACH_OMAP_PALMTT) += lcd_palmtt.o 17 - objs-y$(CONFIG_MACH_OMAP_PALMZ71) += lcd_palmz71.o 18 - objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1610.o 19 - objs-$(CONFIG_ARCH_OMAP15XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1510.o 20 - objs-y$(CONFIG_MACH_OMAP_OSK) += lcd_osk.o 13 + lcds-y$(CONFIG_MACH_AMS_DELTA) += lcd_ams_delta.o 14 + lcds-y$(CONFIG_FB_OMAP_LCD_H3) += lcd_h3.o 15 + lcds-y$(CONFIG_MACH_OMAP_PALMTE) += lcd_palmte.o 16 + lcds-y$(CONFIG_MACH_OMAP_PALMTT) += lcd_palmtt.o 17 + lcds-y$(CONFIG_MACH_OMAP_PALMZ71) += lcd_palmz71.o 18 + lcds-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1610.o 19 + lcds-$(CONFIG_ARCH_OMAP15XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1510.o 20 + lcds-y$(CONFIG_MACH_OMAP_OSK) += lcd_osk.o 21 21 22 - objs-y$(CONFIG_FB_OMAP_LCD_MIPID) += lcd_mipid.o 23 - objs-y$(CONFIG_MACH_HERALD) += lcd_htcherald.o 22 + lcds-y$(CONFIG_FB_OMAP_LCD_MIPID) += lcd_mipid.o 23 + lcds-y$(CONFIG_MACH_HERALD) += lcd_htcherald.o 24 24 25 25 omapfb-objs := $(objs-yy) 26 26 27 + obj-$(CONFIG_FB_OMAP) += $(lcds-yy)
+1
drivers/video/fbdev/omap/omapfb_main.c
··· 1823 1823 if (fbdev_pdev != NULL) 1824 1824 omapfb_do_probe(fbdev_pdev, fbdev_panel); 1825 1825 } 1826 + EXPORT_SYMBOL_GPL(omapfb_register_panel); 1826 1827 1827 1828 /* Called when the device is being detached from the driver */ 1828 1829 static int omapfb_remove(struct platform_device *pdev)
+1 -1
include/linux/omap-dma.h
··· 393 393 extern int omap_dma_chain_status(int chain_id); 394 394 #endif 395 395 396 - #if defined(CONFIG_ARCH_OMAP1) && defined(CONFIG_FB_OMAP) 396 + #if defined(CONFIG_ARCH_OMAP1) && IS_ENABLED(CONFIG_FB_OMAP) 397 397 #include <mach/lcd_dma.h> 398 398 #else 399 399 static inline int omap_lcd_dma_running(void)