2 * linux/arch/arm/mach-omap1/leds.c
6 #include <linux/gpio.h>
7 #include <linux/kernel.h>
8 #include <linux/init.h>
11 #include <asm/mach-types.h>
20 if (!cpu_class_is_omap1())
23 if (machine_is_omap_innovator())
24 leds_event
= innovator_leds_event
;
26 else if (machine_is_omap_h2()
27 || machine_is_omap_h3()
28 || machine_is_omap_perseus2())
29 leds_event
= h2p2_dbg_leds_event
;
31 else if (machine_is_omap_osk())
32 leds_event
= osk_leds_event
;
37 if (machine_is_omap_h2()
38 || machine_is_omap_h3()
39 #ifdef CONFIG_OMAP_OSK_MISTRAL
40 || machine_is_omap_osk()
44 /* LED1/LED2 pins can be used as GPIO (as done here), or by
45 * the LPG (works even in deep sleep!), to drive a bicolor
46 * LED on the H2 sample board, and another on the H2/P2
47 * "surfer" expansion board.
49 * The same pins drive a LED on the OSK Mistral board, but
50 * that's a different kind of LED (just one color at a time).
52 omap_cfg_reg(P18_1610_GPIO3
);
53 if (gpio_request(3, "LED red") == 0)
54 gpio_direction_output(3, 1);
56 printk(KERN_WARNING
"LED: can't get GPIO3/red?\n");
59 if (gpio_request(OMAP_MPUIO(4), "LED green") == 0)
60 gpio_direction_output(OMAP_MPUIO(4), 1);
62 printk(KERN_WARNING
"LED: can't get MPUIO4/green?\n");
65 leds_event(led_start
);
69 __initcall(omap_leds_init
);