1 From e7cd2f89a99dc1bc54dc8caf93134060641a3746 Mon Sep 17 00:00:00 2001
2 From: Koen Kooi <koen@dominion.thruhere.net>
3 Date: Sun, 5 Dec 2010 13:25:00 +0100
4 Subject: [PATCH 04/48] ARM: OMAP: beagleboard: pre-export GPIOs to userspace when using a Tincantools trainerboard
6 This really needs a for loop, patches welcome
8 Signed-off-by: Koen Kooi <koen@beagleboard.org>
10 arch/arm/mach-omap2/board-omap3beagle.c | 31 +++++++++++++++++++++++++++++++
11 1 files changed, 31 insertions(+), 0 deletions(-)
13 diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
14 index 495be15..34f2132 100644
15 --- a/arch/arm/mach-omap2/board-omap3beagle.c
16 +++ b/arch/arm/mach-omap2/board-omap3beagle.c
17 @@ -731,6 +731,37 @@ static void __init omap3_beagle_init(void)
21 + if(!strcmp(expansionboard_name, "trainer"))
23 + printk(KERN_INFO "Beagle expansionboard: exporting GPIOs 130-141,162 to userspace\n");
24 + gpio_request(130, "sysfs");
25 + gpio_export(130, 1);
26 + gpio_request(131, "sysfs");
27 + gpio_export(131, 1);
28 + gpio_request(132, "sysfs");
29 + gpio_export(132, 1);
30 + gpio_request(133, "sysfs");
31 + gpio_export(133, 1);
32 + gpio_request(134, "sysfs");
33 + gpio_export(134, 1);
34 + gpio_request(135, "sysfs");
35 + gpio_export(135, 1);
36 + gpio_request(136, "sysfs");
37 + gpio_export(136, 1);
38 + gpio_request(137, "sysfs");
39 + gpio_export(137, 1);
40 + gpio_request(138, "sysfs");
41 + gpio_export(138, 1);
42 + gpio_request(139, "sysfs");
43 + gpio_export(139, 1);
44 + gpio_request(140, "sysfs");
45 + gpio_export(140, 1);
46 + gpio_request(141, "sysfs");
47 + gpio_export(141, 1);
48 + gpio_request(162, "sysfs");
49 + gpio_export(162, 1);
52 usb_musb_init(&musb_board_data);
53 usb_ehci_init(&ehci_pdata);
54 omap3beagle_flash_init();