From 9660279966a4fee54ad5002f24f4b63749b446eb Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Tue, 15 Apr 2025 20:09:50 +0100 Subject: [PATCH] drivers/usb/intel_bluetooth: Hook RTD3 up to the option API This makes Bluetooth RTD3 runtime configurable. Change-Id: I467634e013a140e0a39802d2a1767583ba33a76e Signed-off-by: Sean Rhodes Reviewed-on: https://review.coreboot.org/c/coreboot/+/87326 Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier --- src/drivers/usb/acpi/intel_bluetooth.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/drivers/usb/acpi/intel_bluetooth.c b/src/drivers/usb/acpi/intel_bluetooth.c index acefffc041..4c882cde9d 100644 --- a/src/drivers/usb/acpi/intel_bluetooth.c +++ b/src/drivers/usb/acpi/intel_bluetooth.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include +#include #include "chip.h" /* @@ -51,7 +52,10 @@ void acpi_device_intel_bt(const struct acpi_gpio *enable_gpio, /* * Name (_S0W, 3) */ - acpigen_write_name_integer("_S0W", ACPI_DEVICE_SLEEP_D3_HOT); + if (get_uint_option("bluetooth_rtd3", 1)) + acpigen_write_name_integer("_S0W", ACPI_DEVICE_SLEEP_D3_HOT); + else + acpigen_write_name_integer("_S0W", ACPI_DEVICE_SLEEP_D0); /* * Name (_DSD, Package (0x02) @@ -173,7 +177,7 @@ void acpi_device_intel_bt(const struct acpi_gpio *enable_gpio, acpigen_write_method("_ON", 0); { - if (enable_gpio->pin_count) { + if (get_uint_option("bluetooth_rtd3", 1) && enable_gpio->pin_count) { acpigen_write_store(); acpigen_emit_namestring("\\_SB.PCI0.GBTE"); acpigen_emit_byte(LOCAL0_OP); @@ -192,7 +196,7 @@ void acpi_device_intel_bt(const struct acpi_gpio *enable_gpio, acpigen_write_method("_OFF", 0); { - if (enable_gpio->pin_count) { + if (get_uint_option("bluetooth_rtd3", 1) && enable_gpio->pin_count) { acpigen_emit_namestring("\\_SB.PCI0.SBTE"); acpigen_emit_byte(0); }