[U-Boot,for-rc] lsxl: also turn off fan in power down mode

Submitted by Michael Walle on Sept. 30, 2012, 1:11 p.m.

Details

Message ID 1349010665-12097-1-git-send-email-michael@walle.cc
State Accepted
Delegated to: Prafulla Wadaskar
Headers show

Commit Message

Michael Walle Sept. 30, 2012, 1:11 p.m.
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>
---

Hi Tom, Hi Prafulla,

while testing, i noticed i've forgot to turn off the fan in power down
mode which was introduced in commit a9f1a4893364dd.

Tom, can you pick this bugfix patch so it can make it into the 2012.10
release?

Thanks, Michael

 board/buffalo/lsxl/lsxl.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

Comments

Prafulla Wadaskar Oct. 3, 2012, 8:04 a.m.
> -----Original Message-----
> From: Michael Walle [mailto:michael@walle.cc]
> Sent: 30 September 2012 18:41
> To: u-boot@lists.denx.de
> Cc: Tom Rini; Michael Walle; Prafulla Wadaskar
> Subject: [PATCH for-rc] 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>
> ---
> 
> Hi Tom, Hi Prafulla,
> 
> while testing, i noticed i've forgot to turn off the fan in power down
> mode which was introduced in commit a9f1a4893364dd.
> 
> Tom, can you pick this bugfix patch so it can make it into the 2012.10
> release?
> 
> Thanks, Michael

Applied to u-boot-marvell.git master branch

Regards...
Prafulla . . .

Patch hide | download patch | download mbox

diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c
index b3f31d6..57776fb 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);
 	}
 }