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