1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <console/console.h>
4 #include <device/device.h>
6 #include <southbridge/intel/common/gpio.h>
7 #include <ec/lenovo/h8/h8.h>
8 #include <ec/acpi/ec.h>
13 printk(BIOS_DEBUG
, "dock is connected\n");
16 printk(BIOS_DEBUG
, "dock is not connected\n");
20 void dock_connect(void)
26 set_gpio(28, GPIO_LEVEL_HIGH
);
29 void dock_disconnect(void)
35 set_gpio(28, GPIO_LEVEL_LOW
);
38 int dock_present(void)
40 const int dock_id_gpio
[] = { 3, 4, 5, -1};
42 return get_gpios(dock_id_gpio
) != 7;