summaryrefslogtreecommitdiff
path: root/src/mainboard/lenovo/t400/dock.c
diff options
context:
space:
mode:
authorPatrick Rudolph <siro@das-labor.org>2017-06-25 09:03:37 +0200
committerMartin Roth <martinroth@google.com>2017-07-02 18:40:44 +0000
commitcfc73952b802baf57b8cb35f6668416d58ed6fd6 (patch)
tree54d243f286e5fd9907bb291a136dd2ee047b2dd1 /src/mainboard/lenovo/t400/dock.c
parent89a7b6bd245502f4bf7dc5b8d0c1313fbda0f88a (diff)
downloadcoreboot-cfc73952b802baf57b8cb35f6668416d58ed6fd6.tar.xz
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 <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/20327 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/mainboard/lenovo/t400/dock.c')
-rw-r--r--src/mainboard/lenovo/t400/dock.c10
1 files changed, 10 insertions, 0 deletions
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)