aboutsummaryrefslogtreecommitdiff
path: root/board/buffalo
diff options
context:
space:
mode:
authorMichael Walle2012-09-30 03:11:05 +0000
committerPrafulla Wadaskar2012-10-03 16:48:34 +0530
commit9bd2317b450d379f4b8162e7dbb9997bf3a14dff (patch)
tree09882404e196710eb6531d984b94c02199eae660 /board/buffalo
parentbe3e8be0a7cd07c14647bd30ad87ce2540f3e4c7 (diff)
lsxl: also turn off fan in power down mode
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>
Diffstat (limited to 'board/buffalo')
-rw-r--r--board/buffalo/lsxl/lsxl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c
index b3f31d6b697..57776fb0774 100644
--- a/board/buffalo/lsxl/lsxl.c
+++ b/board/buffalo/lsxl/lsxl.c
@@ -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);
}
}