Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[linux/fpc-iii.git] / arch / arm / mach-omap2 / board-rx51-video.c
blob43a90c8d68375594bb97d3a904021b534e217805
1 /*
2 * linux/arch/arm/mach-omap2/board-rx51-video.c
4 * Copyright (C) 2010 Nokia
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
11 #include <linux/kernel.h>
12 #include <linux/init.h>
13 #include <linux/platform_device.h>
14 #include <linux/gpio.h>
15 #include <linux/spi/spi.h>
16 #include <linux/mm.h>
17 #include <asm/mach-types.h>
18 #include <video/omapdss.h>
19 #include <video/omap-panel-data.h>
21 #include <linux/platform_data/spi-omap2-mcspi.h>
23 #include "soc.h"
24 #include "board-rx51.h"
26 #include "mux.h"
28 #define RX51_LCD_RESET_GPIO 90
30 #if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
32 static struct connector_atv_platform_data rx51_tv_pdata = {
33 .name = "tv",
34 .source = "venc.0",
35 .connector_type = OMAP_DSS_VENC_TYPE_COMPOSITE,
36 .invert_polarity = false,
39 static struct platform_device rx51_tv_connector_device = {
40 .name = "connector-analog-tv",
41 .id = 0,
42 .dev.platform_data = &rx51_tv_pdata,
45 static struct omap_dss_board_info rx51_dss_board_info = {
46 .default_display_name = "lcd",
49 static int __init rx51_video_init(void)
51 if (!machine_is_nokia_rx51() && !of_machine_is_compatible("nokia,omap3-n900"))
52 return 0;
54 if (omap_mux_init_gpio(RX51_LCD_RESET_GPIO, OMAP_PIN_OUTPUT)) {
55 pr_err("%s cannot configure MUX for LCD RESET\n", __func__);
56 return 0;
59 omap_display_init(&rx51_dss_board_info);
61 platform_device_register(&rx51_tv_connector_device);
63 return 0;
66 omap_subsys_initcall(rx51_video_init);
67 #endif /* defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) */