[ifxmips] many more code cleanups for checkpatch.pl, most flagged as errors
[openwrt.git] / target / linux / at91 / patches-2.6.21 / 015-simenable.patch
1 Index: linux-2.6.21.7/arch/arm/mach-at91/board-vlink.c
2 ===================================================================
3 --- linux-2.6.21.7.orig/arch/arm/mach-at91/board-vlink.c
4 +++ linux-2.6.21.7/arch/arm/mach-at91/board-vlink.c
5 @@ -150,32 +150,38 @@ static void __init vlink_board_init(void
6 /* LEDs */
7 // at91_gpio_leds(vlink_leds, ARRAY_SIZE(vlink_leds));
8
9 -/* Other LED's */
10 - at91_set_gpio_output(AT91_PIN_PC7, 1); // LED FRONT AP1
11 - at91_set_gpio_output(AT91_PIN_PC8, 1); // LED FRONT BP1
12 - at91_set_gpio_output(AT91_PIN_PB14, 1); // LED BACK AP1
13 - at91_set_gpio_output(AT91_PIN_PB15, 1); // LED BACK BP1
14 - at91_set_gpio_output(AT91_PIN_PB16, 1); // LED BACK AP2
15 - at91_set_gpio_output(AT91_PIN_PB17, 1); // LED BACK BP2
16 -
17 -/* SIM Cards */
18 - at91_set_gpio_output(AT91_PIN_PB9, 1); // ENBSC3
19 - at91_set_gpio_output(AT91_PIN_PB10, 1); // ENBSC2
20 - at91_set_gpio_output(AT91_PIN_PB11, 1); // ENBSC1
21 -
22 -/* GSM Module Control */
23 - at91_set_gpio_output(AT91_PIN_PB12, 1); // GSMONOFF
24 -
25 -/* Test jig presence detection */
26 - at91_set_gpio_input(AT91_PIN_PB8, 1); // JIGPRESENT
27 -
28 -/* Power indicator */
29 - at91_set_gpio_input(AT91_PIN_PB22, 1); // PWR_IND
30 -
31 -/* USB Device control */
32 - at91_set_gpio_input(AT91_PIN_PB27, 1); // UDB_CNX
33 - at91_set_gpio_output(AT91_PIN_PB28, 1); // UDB_PUP
34 - at91_set_multi_drive(AT91_PIN_PB28, 1); // Set to multi-drive
35 + /* Other LED's */
36 + at91_set_gpio_output(AT91_PIN_PC7, 1); // LED FRONT AP1
37 + at91_set_gpio_output(AT91_PIN_PC8, 1); // LED FRONT BP1
38 + at91_set_gpio_output(AT91_PIN_PB14, 1); // LED BACK AP1
39 + at91_set_gpio_output(AT91_PIN_PB15, 1); // LED BACK BP1
40 + at91_set_gpio_output(AT91_PIN_PB16, 1); // LED BACK AP2
41 + at91_set_gpio_output(AT91_PIN_PB17, 1); // LED BACK BP2
42 +
43 + /* Test jig presence detection */
44 + at91_set_gpio_input(AT91_PIN_PB8, 1); // JIGPRESENT
45 +
46 + /* SIM Cards */
47 + if (at91_get_gpio_value(AT91_PIN_PB8)) {
48 + at91_set_gpio_output(AT91_PIN_PB11, 0);
49 + at91_set_gpio_output(AT91_PIN_PB9, 1);
50 + } else {
51 + at91_set_gpio_output(AT91_PIN_PB11, 1);
52 + at91_set_gpio_output(AT91_PIN_PB9, 0);
53 + }
54 +
55 + at91_set_gpio_output(AT91_PIN_PB10, 1); // ENBSC2
56 +
57 + /* GSM Module Control */
58 + at91_set_gpio_output(AT91_PIN_PB12, 1); // GSMONOFF
59 +
60 + /* Power indicator */
61 + at91_set_gpio_input(AT91_PIN_PB22, 1); // PWR_IND
62 +
63 + /* USB Device control */
64 + at91_set_gpio_input(AT91_PIN_PB27, 1); // UDB_CNX
65 + at91_set_gpio_output(AT91_PIN_PB28, 1); // UDB_PUP
66 + at91_set_multi_drive(AT91_PIN_PB28, 1); // Set to multi-drive
67
68 }
69
This page took 0.047281 seconds and 5 git commands to generate.