Skip to content

Commit 81c44c2

Browse files
arndbtomba
authored andcommitted
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 <[email protected]> Signed-off-by: Peter Griffin <[email protected]> Cc: Jean-Christophe Plagniol-Villard <[email protected]> Cc: Tomi Valkeinen <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Tomi Valkeinen <[email protected]>
1 parent f7200b6 commit 81c44c2

File tree

4 files changed

+23
-12
lines changed

4 files changed

+23
-12
lines changed

drivers/video/fbdev/omap/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ config FB_OMAP_LCD_MIPID
3939
the Mobile Industry Processor Interface DBI-C/DCS
4040
specification. (Supported LCDs: Philips LPH8923, Sharp LS041Y3)
4141

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+
4251
config FB_OMAP_DMA_TUNE
4352
bool "Set DMA SDRAM access priority high"
4453
depends on FB_OMAP

drivers/video/fbdev/omap/Makefile

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,18 @@ objs-y$(CONFIG_FB_OMAP_LCDC_EXTERNAL) += sossi.o
1010

1111
objs-y$(CONFIG_FB_OMAP_LCDC_HWA742) += hwa742.o
1212

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
21-
22-
objs-y$(CONFIG_FB_OMAP_LCD_MIPID) += lcd_mipid.o
23-
objs-y$(CONFIG_MACH_HERALD) += lcd_htcherald.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+
22+
lcds-y$(CONFIG_FB_OMAP_LCD_MIPID) += lcd_mipid.o
23+
lcds-y$(CONFIG_MACH_HERALD) += lcd_htcherald.o
2424

2525
omapfb-objs := $(objs-yy)
2626

27+
obj-$(CONFIG_FB_OMAP) += $(lcds-yy)

drivers/video/fbdev/omap/omapfb_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1823,6 +1823,7 @@ void omapfb_register_panel(struct lcd_panel *panel)
18231823
if (fbdev_pdev != NULL)
18241824
omapfb_do_probe(fbdev_pdev, fbdev_panel);
18251825
}
1826+
EXPORT_SYMBOL_GPL(omapfb_register_panel);
18261827

18271828
/* Called when the device is being detached from the driver */
18281829
static int omapfb_remove(struct platform_device *pdev)

include/linux/omap-dma.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ extern int omap_modify_dma_chain_params(int chain_id,
393393
extern int omap_dma_chain_status(int chain_id);
394394
#endif
395395

396-
#if defined(CONFIG_ARCH_OMAP1) && defined(CONFIG_FB_OMAP)
396+
#if defined(CONFIG_ARCH_OMAP1) && IS_ENABLED(CONFIG_FB_OMAP)
397397
#include <mach/lcd_dma.h>
398398
#else
399399
static inline int omap_lcd_dma_running(void)

0 commit comments

Comments
 (0)