2 * linux/arch/arm/mach-omap/leds.c
6 #include <linux/kernel.h>
7 #include <linux/init.h>
10 #include <asm/mach-types.h>
12 #include <asm/arch/gpio.h>
13 #include <asm/arch/mux.h>
20 if (machine_is_omap_innovator())
21 leds_event
= innovator_leds_event
;
23 else if (machine_is_omap_h2() || machine_is_omap_perseus2())
24 leds_event
= h2p2_dbg_leds_event
;
26 else if (machine_is_omap_osk())
27 leds_event
= osk_leds_event
;
32 if (machine_is_omap_h2()
33 || machine_is_omap_perseus2()
34 || machine_is_omap_osk()) {
36 /* LED1/LED2 pins can be used as GPIO (as done here), or by
37 * the LPG (works even in deep sleep!), to drive a bicolor
38 * LED on the H2 sample board, and another on the H2/P2
39 * "surfer" expansion board.
41 * The same pins drive a LED on the OSK Mistral board, but
42 * that's a different kind of LED (just one color at a time).
44 omap_cfg_reg(P18_1610_GPIO3
);
45 if (omap_request_gpio(3) == 0)
46 omap_set_gpio_direction(3, 0);
48 printk(KERN_WARNING
"LED: can't get GPIO3/red?\n");
51 if (omap_request_gpio(OMAP_MPUIO(4)) == 0)
52 omap_set_gpio_direction(OMAP_MPUIO(4), 0);
54 printk(KERN_WARNING
"LED: can't get MPUIO4/green?\n");
57 leds_event(led_start
);
61 __initcall(omap_leds_init
);