Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 216953
b: refs/heads/master
c: 243e76b
h: refs/heads/master
i:
  216951: f5f410f
v: v3
  • Loading branch information
Janusz Krzysztofik authored and Tony Lindgren committed Oct 1, 2010
1 parent f1de528 commit c9f9d42
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8452e9ef2b08c7bd492194554cdffc67d0b2a51b
refs/heads/master: 243e76b426e6e040961b84249b4eaab4ad9fa6dc
24 changes: 24 additions & 0 deletions trunk/arch/arm/mach-omap1/board-ams-delta.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/init.h>
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/leds.h>
#include <linux/platform_device.h>
#include <linux/serial_8250.h>

Expand Down Expand Up @@ -222,11 +223,30 @@ static struct i2c_board_info ams_delta_camera_board_info[] = {
},
};

#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 __initdata 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 = {
Expand Down Expand Up @@ -281,6 +301,10 @@ static void __init ams_delta_init(void)

omap1_usb_init(&ams_delta_usb_config);
omap1_set_camera_info(&ams_delta_camera_platform_data);
#ifdef CONFIG_LEDS_TRIGGERS
led_trigger_register_simple("ams_delta_camera",
&ams_delta_camera_led_trigger);
#endif
platform_add_devices(ams_delta_devices, ARRAY_SIZE(ams_delta_devices));

#ifdef CONFIG_AMS_DELTA_FIQ
Expand Down

0 comments on commit c9f9d42

Please sign in to comment.