]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
lsxl: also turn off fan in power down mode
authorMichael Walle <michael@walle.cc>
Sun, 30 Sep 2012 03:11:05 +0000 (03:11 +0000)
committerPrafulla Wadaskar <prafulla@marvell.com>
Wed, 3 Oct 2012 11:18:34 +0000 (16:48 +0530)
If while booting the power switch is in OFF position, turn off the fan,
too.

Signed-off-by: Michael Walle <michael@walle.cc>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
board/buffalo/lsxl/lsxl.c

index b3f31d6b697921e5f4ba5a923d9adcf7566ebc93..57776fb077400599fbc30333c58baede3b30bb35 100644 (file)
@@ -195,9 +195,11 @@ int board_init(void)
 static void check_power_switch(void)
 {
        if (kw_gpio_get_value(GPIO_POWER_SWITCH)) {
-               /* turn off HDD and USB power */
+               /* turn off fan, HDD and USB power */
                kw_gpio_set_value(GPIO_HDD_POWER, 0);
                kw_gpio_set_value(GPIO_USB_VBUS, 0);
+               kw_gpio_set_value(GPIO_FAN_HIGH, 1);
+               kw_gpio_set_value(GPIO_FAN_LOW, 1);
                set_led(LED_OFF);
 
                /* loop until released */
@@ -207,6 +209,8 @@ static void check_power_switch(void)
                /* turn power on again */
                kw_gpio_set_value(GPIO_HDD_POWER, 1);
                kw_gpio_set_value(GPIO_USB_VBUS, 1);
+               kw_gpio_set_value(GPIO_FAN_HIGH, 0);
+               kw_gpio_set_value(GPIO_FAN_LOW, 0);
                set_led(LED_POWER_BLINKING);
        }
 }