From cfc73952b802baf57b8cb35f6668416d58ed6fd6 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Sun, 25 Jun 2017 09:03:37 +0200 Subject: 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 off again. Tested on Lenovo T500. Change-Id: Ib5851f4abcedf4041faae6b3b810102012f488cd Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/20327 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans --- src/mainboard/lenovo/t400/dock.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/mainboard/lenovo') diff --git a/src/mainboard/lenovo/t400/dock.c b/src/mainboard/lenovo/t400/dock.c index 65dd6f0514..74711e1227 100644 --- a/src/mainboard/lenovo/t400/dock.c +++ b/src/mainboard/lenovo/t400/dock.c @@ -236,11 +236,21 @@ void dock_connect(void) 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) -- cgit v1.2.3