1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <southbridge/intel/common/gpio.h>
4 #include <console/console.h>
5 #include <device/device.h>
6 #include <ec/acpi/ec.h>
14 * Controls BDC (Bluetooth daughter card) power.
16 void h8_bluetooth_enable(int on
)
25 * Detect BDC on supported MBs.
27 bool h8_has_bdc(const struct device
*dev
)
29 struct ec_lenovo_h8_config
*conf
= dev
->chip_info
;
31 if (!conf
->has_bdc_detection
) {
32 printk(BIOS_INFO
, "H8: BDC detection not implemented. "
33 "Assuming BDC installed\n");
37 if (get_gpio(conf
->bdc_gpio_num
) == conf
->bdc_gpio_lvl
) {
38 printk(BIOS_INFO
, "H8: BDC installed\n");
42 printk(BIOS_INFO
, "H8: BDC not installed\n");
47 * Return BDC NVRAM setting.
49 bool h8_bluetooth_nv_enable(void)
51 return get_uint_option("bluetooth", true);