board-rx51-video.c 1.6 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/*
 * linux/arch/arm/mach-omap2/board-rx51-video.c
 *
 * Copyright (C) 2010 Nokia
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/gpio.h>
#include <linux/spi/spi.h>
#include <linux/mm.h>
#include <asm/mach-types.h>
18
#include <linux/platform_data/omapdss.h>
19 20
#include <video/omap-panel-data.h>

21
#include <linux/platform_data/spi-omap2-mcspi.h>
22

T
Tony Lindgren 已提交
23
#include "soc.h"
24
#include "board-rx51.h"
25
#include "display.h"
26

27 28 29 30 31 32
#include "mux.h"

#define RX51_LCD_RESET_GPIO	90

#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)

33 34 35 36
static struct connector_atv_platform_data rx51_tv_pdata = {
	.name = "tv",
	.source = "venc.0",
	.invert_polarity = false,
37
};
38

39 40 41 42
static struct platform_device rx51_tv_connector_device = {
	.name                   = "connector-analog-tv",
	.id                     = 0,
	.dev.platform_data      = &rx51_tv_pdata,
43 44 45
};

static struct omap_dss_board_info rx51_dss_board_info = {
46
	.default_display_name = "lcd",
47 48 49 50
};

static int __init rx51_video_init(void)
{
51
	if (!machine_is_nokia_rx51())
52 53 54 55 56 57 58
		return 0;

	if (omap_mux_init_gpio(RX51_LCD_RESET_GPIO, OMAP_PIN_OUTPUT)) {
		pr_err("%s cannot configure MUX for LCD RESET\n", __func__);
		return 0;
	}

59
	omap_display_init(&rx51_dss_board_info);
60

61 62
	platform_device_register(&rx51_tv_connector_device);

63 64 65
	return 0;
}

T
Tony Lindgren 已提交
66
omap_subsys_initcall(rx51_video_init);
67
#endif /* defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) */