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>
This commit is contained in:
Patrick Rudolph 2017-06-25 09:03:37 +02:00 committed by Martin Roth
parent 89a7b6bd24
commit cfc73952b8
1 changed files with 10 additions and 0 deletions

View File

@ -236,11 +236,21 @@ void dock_connect(void)
return; return;
} }
pc87384_init(); 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) void dock_disconnect(void)
{ {
pc87382_disconnect(); 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) void h8_mainboard_init_dock(void)