[coreboot-gerrit] Change in coreboot[master]: mb/lenovo/t400/dock: Control LEDs

Patrick Rudolph (Code Review) gerrit at coreboot.org
Sun Jun 25 09:06:48 CEST 2017


Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/20327


Change subject: mb/lenovo/t400/dock: Control LEDs
......................................................................

mb/lenovo/t400/dock: Control LEDs

Toggle LEDs after successful dock and undock.

On boot the LED will light up and on undock button
press the LED will turn of again.

Tested on Lenovo T500.

Change-Id: Ib5851f4abcedf4041faae6b3b810102012f488cd
Signed-off-by: Patrick Rudolph <siro at das-labor.org>
---
M src/mainboard/lenovo/t400/dock.c
1 file changed, 10 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/27/20327/1

diff --git a/src/mainboard/lenovo/t400/dock.c b/src/mainboard/lenovo/t400/dock.c
index 65dd6f0..74711e1 100644
--- a/src/mainboard/lenovo/t400/dock.c
+++ b/src/mainboard/lenovo/t400/dock.c
@@ -236,11 +236,21 @@
 		return;
 	}
 	pc87384_init();
+
+	ec_write(H8_LED_CONTROL,
+		 H8_LED_CONTROL_OFF | H8_LED_CONTROL_DOCK_LED1);
+	ec_write(H8_LED_CONTROL,
+		 H8_LED_CONTROL_ON  | H8_LED_CONTROL_DOCK_LED2);
 }
 
 void dock_disconnect(void)
 {
 	pc87382_disconnect();
+
+	ec_write(H8_LED_CONTROL,
+		 H8_LED_CONTROL_OFF | H8_LED_CONTROL_DOCK_LED1);
+	ec_write(H8_LED_CONTROL,
+		 H8_LED_CONTROL_OFF | H8_LED_CONTROL_DOCK_LED2);
 }
 
 void h8_mainboard_init_dock(void)

-- 
To view, visit https://review.coreboot.org/20327
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib5851f4abcedf4041faae6b3b810102012f488cd
Gerrit-Change-Number: 20327
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <siro at das-labor.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170625/aaab58e8/attachment.html>


More information about the coreboot-gerrit mailing list