diff options
author | Rob Herring <r.herring@freescale.com> | 2007-12-17 17:48:04 -0600 |
---|---|---|
committer | Daniel Schaeffer <daniel.schaeffer@timesys.com> | 2008-08-25 15:20:48 -0400 |
commit | 0ec59916aa565b7c1a581637f60b7b3fc0bc06e3 (patch) | |
tree | 5a295eddbc44635dc74ca93afd85b4a746ede704 /arch | |
parent | f9c42417d26bd53bb52050dcb734690351d01f8a (diff) |
ENGR00064696 Add MX31 3-Stack CH7024 TV encoder driver.
This patch adds support for the MX31 3-Stack Chrontel CH7024 TV encoder driver.
Signed-off-by: Rob Herring <r.herring@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/configs/imx31_3stack_defconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mx3_3stack.c | 51 |
2 files changed, 25 insertions, 27 deletions
diff --git a/arch/arm/configs/imx31_3stack_defconfig b/arch/arm/configs/imx31_3stack_defconfig index b244e66f847b..7f1380c12979 100644 --- a/arch/arm/configs/imx31_3stack_defconfig +++ b/arch/arm/configs/imx31_3stack_defconfig @@ -952,6 +952,7 @@ CONFIG_FB_MXC=y CONFIG_FB_MXC_SYNC_PANEL=y CONFIG_FB_MXC_EPSON_VGA_SYNC_PANEL=y # CONFIG_FB_MXC_TVOUT is not set +CONFIG_FB_MXC_TVOUT_CH7024=y # CONFIG_FB_MXC_ASYNC_PANEL is not set # CONFIG_FB_UVESA is not set # CONFIG_FB_S1D13XXX is not set diff --git a/arch/arm/mach-mx3/mx3_3stack.c b/arch/arm/mach-mx3/mx3_3stack.c index eceab15d14f4..8299de42d031 100644 --- a/arch/arm/mach-mx3/mx3_3stack.c +++ b/arch/arm/mach-mx3/mx3_3stack.c @@ -25,6 +25,7 @@ #include <linux/irq.h> #include <linux/init.h> #include <linux/input.h> +#include <linux/i2c.h> #include <linux/nodemask.h> #include <linux/clk.h> #include <linux/platform_device.h> @@ -220,12 +221,23 @@ static struct mxc_camera_platform_data camera_data = { .gpo_regulator = "GPO3", }; +struct mxc_tvout_platform_data tvout_data = { + .io_reg = "VGEN", + .core_reg = "GPO3", + .analog_reg = "GPO1", + .detect_line = MX31_PIN_BATT_LINE, +}; + static struct i2c_board_info mxc_i2c_board_info[] __initdata = { { .driver_name = "ov2640", .addr = 0x30, - .platform_data = (void *)&camera_data, - }, + .platform_data = (void *)&camera_data,}, + { + .driver_name = "ch7024", + .addr = 0x76, + .platform_data = (void *)&tvout_data, + .irq = IOMUX_TO_IRQ(MX31_PIN_BATT_LINE),}, }; static struct spi_board_info mxc_spi_board_info[] __initdata = { @@ -325,28 +337,9 @@ static inline void mxc_init_bl(void) } #endif -#if defined(CONFIG_MXC_HP_DETECT) || defined(CONFIG_MXC_HP_DETECT_MODULE) - -static struct resource mxc_hp_detect_resources[] = { - [0] = { - .start = IOMUX_TO_IRQ(MX31_PIN_BATT_LINE), - .end = IOMUX_TO_IRQ(MX31_PIN_BATT_LINE), - .flags = IORESOURCE_IRQ, - } -}; - -/* mxc headphone detect driver */ -static struct platform_device mxc_hp_detect_device = { - .name = "hp_detect", - .id = 0, - .num_resources = ARRAY_SIZE(mxc_hp_detect_resources), - .resource = mxc_hp_detect_resources, - .dev = { - .release = mxc_nop_release, - }, -}; - -static int mxc_init_hp_detect(void) +#if defined(CONFIG_FB_MXC_TVOUT_CH7024) || \ + defined(CONFIG_FB_MXC_TVOUT_CH7024_MODULE) +static int mxc_init_ch7024(void) { /* request gpio for phone jack detect */ mxc_request_iomux(MX31_PIN_BATT_LINE, OUTPUTCONFIG_GPIO, @@ -354,11 +347,12 @@ static int mxc_init_hp_detect(void) mxc_iomux_set_pad(MX31_PIN_BATT_LINE, PAD_CTL_PKE_NONE); mxc_set_gpio_direction(MX31_PIN_BATT_LINE, 1); - return platform_device_register(&mxc_hp_detect_device); + return 0; } #else -static inline void mxc_init_hp_detect(void) +static inline int mxc_init_ch7024(void) { + return 0; } #endif @@ -680,7 +674,10 @@ static void __init mxc_board_init(void) mxc_init_keypad(); mxc_init_enet(); mxc_init_nand_mtd(); - mxc_init_hp_detect(); + mxc_init_ch7024(); + + i2c_register_board_info(0, mxc_i2c_board_info, + ARRAY_SIZE(mxc_i2c_board_info)); i2c_register_board_info(0, mxc_i2c_board_info, ARRAY_SIZE(mxc_i2c_board_info)); |