mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
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>
This commit is contained in:
parent
be3e8be0a7
commit
9bd2317b45
1 changed files with 5 additions and 1 deletions
|
@ -195,9 +195,11 @@ int board_init(void)
|
||||||
static void check_power_switch(void)
|
static void check_power_switch(void)
|
||||||
{
|
{
|
||||||
if (kw_gpio_get_value(GPIO_POWER_SWITCH)) {
|
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_HDD_POWER, 0);
|
||||||
kw_gpio_set_value(GPIO_USB_VBUS, 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);
|
set_led(LED_OFF);
|
||||||
|
|
||||||
/* loop until released */
|
/* loop until released */
|
||||||
|
@ -207,6 +209,8 @@ static void check_power_switch(void)
|
||||||
/* turn power on again */
|
/* turn power on again */
|
||||||
kw_gpio_set_value(GPIO_HDD_POWER, 1);
|
kw_gpio_set_value(GPIO_HDD_POWER, 1);
|
||||||
kw_gpio_set_value(GPIO_USB_VBUS, 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);
|
set_led(LED_POWER_BLINKING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue