|  | @@ -315,3 +315,160 @@ static struct resource ams_delta_nand_resources[] = {
 | 
	
		
			
				|  |  |  		.flags	= IORESOURCE_MEM,
 | 
	
		
			
				|  |  |  	},
 | 
	
		
			
				|  |  |  };
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static struct platform_device ams_delta_nand_device = {
 | 
	
		
			
				|  |  | +	.name	= "ams-delta-nand",
 | 
	
		
			
				|  |  | +	.id	= -1,
 | 
	
		
			
				|  |  | +	.num_resources	= ARRAY_SIZE(ams_delta_nand_resources),
 | 
	
		
			
				|  |  | +	.resource	= ams_delta_nand_resources,
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static struct resource ams_delta_kp_resources[] = {
 | 
	
		
			
				|  |  | +	[0] = {
 | 
	
		
			
				|  |  | +		.start	= INT_KEYBOARD,
 | 
	
		
			
				|  |  | +		.end	= INT_KEYBOARD,
 | 
	
		
			
				|  |  | +		.flags	= IORESOURCE_IRQ,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static const struct matrix_keymap_data ams_delta_keymap_data = {
 | 
	
		
			
				|  |  | +	.keymap		= ams_delta_keymap,
 | 
	
		
			
				|  |  | +	.keymap_size	= ARRAY_SIZE(ams_delta_keymap),
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static struct omap_kp_platform_data ams_delta_kp_data = {
 | 
	
		
			
				|  |  | +	.rows		= 8,
 | 
	
		
			
				|  |  | +	.cols		= 8,
 | 
	
		
			
				|  |  | +	.keymap_data	= &ams_delta_keymap_data,
 | 
	
		
			
				|  |  | +	.delay		= 9,
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static struct platform_device ams_delta_kp_device = {
 | 
	
		
			
				|  |  | +	.name		= "omap-keypad",
 | 
	
		
			
				|  |  | +	.id		= -1,
 | 
	
		
			
				|  |  | +	.dev		= {
 | 
	
		
			
				|  |  | +		.platform_data = &ams_delta_kp_data,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	.num_resources	= ARRAY_SIZE(ams_delta_kp_resources),
 | 
	
		
			
				|  |  | +	.resource	= ams_delta_kp_resources,
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static struct platform_device ams_delta_lcd_device = {
 | 
	
		
			
				|  |  | +	.name	= "lcd_ams_delta",
 | 
	
		
			
				|  |  | +	.id	= -1,
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static const struct gpio_led gpio_leds[] __initconst = {
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		.name		 = "camera",
 | 
	
		
			
				|  |  | +		.gpio		 = LATCH1_GPIO_BASE + 0,
 | 
	
		
			
				|  |  | +		.default_state	 = LEDS_GPIO_DEFSTATE_OFF,
 | 
	
		
			
				|  |  | +#ifdef CONFIG_LEDS_TRIGGERS
 | 
	
		
			
				|  |  | +		.default_trigger = "ams_delta_camera",
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		.name		 = "advert",
 | 
	
		
			
				|  |  | +		.gpio		 = LATCH1_GPIO_BASE + 1,
 | 
	
		
			
				|  |  | +		.default_state	 = LEDS_GPIO_DEFSTATE_OFF,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		.name		 = "email",
 | 
	
		
			
				|  |  | +		.gpio		 = LATCH1_GPIO_BASE + 2,
 | 
	
		
			
				|  |  | +		.default_state	 = LEDS_GPIO_DEFSTATE_OFF,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		.name		 = "handsfree",
 | 
	
		
			
				|  |  | +		.gpio		 = LATCH1_GPIO_BASE + 3,
 | 
	
		
			
				|  |  | +		.default_state	 = LEDS_GPIO_DEFSTATE_OFF,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		.name		 = "voicemail",
 | 
	
		
			
				|  |  | +		.gpio		 = LATCH1_GPIO_BASE + 4,
 | 
	
		
			
				|  |  | +		.default_state	 = LEDS_GPIO_DEFSTATE_OFF,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		.name		 = "voice",
 | 
	
		
			
				|  |  | +		.gpio		 = LATCH1_GPIO_BASE + 5,
 | 
	
		
			
				|  |  | +		.default_state	 = LEDS_GPIO_DEFSTATE_OFF,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static const struct gpio_led_platform_data leds_pdata __initconst = {
 | 
	
		
			
				|  |  | +	.leds		= gpio_leds,
 | 
	
		
			
				|  |  | +	.num_leds	= ARRAY_SIZE(gpio_leds),
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static struct i2c_board_info ams_delta_camera_board_info[] = {
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		I2C_BOARD_INFO("ov6650", 0x60),
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#ifdef CONFIG_LEDS_TRIGGERS
 | 
	
		
			
				|  |  | +DEFINE_LED_TRIGGER(ams_delta_camera_led_trigger);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static int ams_delta_camera_power(struct device *dev, int power)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +	/*
 | 
	
		
			
				|  |  | +	 * turn on camera LED
 | 
	
		
			
				|  |  | +	 */
 | 
	
		
			
				|  |  | +	if (power)
 | 
	
		
			
				|  |  | +		led_trigger_event(ams_delta_camera_led_trigger, LED_FULL);
 | 
	
		
			
				|  |  | +	else
 | 
	
		
			
				|  |  | +		led_trigger_event(ams_delta_camera_led_trigger, LED_OFF);
 | 
	
		
			
				|  |  | +	return 0;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +#else
 | 
	
		
			
				|  |  | +#define ams_delta_camera_power	NULL
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static struct soc_camera_link ams_delta_iclink = {
 | 
	
		
			
				|  |  | +	.bus_id         = 0,	/* OMAP1 SoC camera bus */
 | 
	
		
			
				|  |  | +	.i2c_adapter_id = 1,
 | 
	
		
			
				|  |  | +	.board_info     = &ams_delta_camera_board_info[0],
 | 
	
		
			
				|  |  | +	.module_name    = "ov6650",
 | 
	
		
			
				|  |  | +	.power		= ams_delta_camera_power,
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static struct platform_device ams_delta_camera_device = {
 | 
	
		
			
				|  |  | +	.name   = "soc-camera-pdrv",
 | 
	
		
			
				|  |  | +	.id     = 0,
 | 
	
		
			
				|  |  | +	.dev    = {
 | 
	
		
			
				|  |  | +		.platform_data = &ams_delta_iclink,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static struct omap1_cam_platform_data ams_delta_camera_platform_data = {
 | 
	
		
			
				|  |  | +	.camexclk_khz	= 12000,	/* default 12MHz clock, no extra DPLL */
 | 
	
		
			
				|  |  | +	.lclk_khz_max	= 1334,		/* results in 5fps CIF, 10fps QCIF */
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static struct platform_device ams_delta_audio_device = {
 | 
	
		
			
				|  |  | +	.name   = "ams-delta-audio",
 | 
	
		
			
				|  |  | +	.id     = -1,
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static struct platform_device cx20442_codec_device = {
 | 
	
		
			
				|  |  | +	.name   = "cx20442-codec",
 | 
	
		
			
				|  |  | +	.id     = -1,
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static struct platform_device *ams_delta_devices[] __initdata = {
 | 
	
		
			
				|  |  | +	&latch1_gpio_device,
 | 
	
		
			
				|  |  | +	&latch2_gpio_device,
 | 
	
		
			
				|  |  | +	&ams_delta_kp_device,
 | 
	
		
			
				|  |  | +	&ams_delta_camera_device,
 | 
	
		
			
				|  |  | +	&ams_delta_audio_device,
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static struct platform_device *late_devices[] __initdata = {
 | 
	
		
			
				|  |  | +	&ams_delta_nand_device,
 | 
	
		
			
				|  |  | +	&ams_delta_lcd_device,
 | 
	
		
			
				|  |  | +	&cx20442_codec_device,
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static void __init ams_delta_init(void)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +	/* mux pins for uarts */
 | 
	
		
			
				|  |  | +	omap_cfg_reg(UART1_TX);
 |