drivers/usb/intel_bluetooth: Guard BTRK if no GPIO passed
Don't attempt any GPIO operations of there isn't a reset GPIO specified. Change-Id: I9c97963e61f790f2d9c55d8ec1a384a5779782b4 Signed-off-by: Sean Rhodes <sean@starlabs.systems> Reviewed-on: https://review.coreboot.org/c/coreboot/+/86401 Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
9f351c76a3
commit
970d983083
1 changed files with 12 additions and 10 deletions
|
|
@ -328,17 +328,19 @@ void acpi_device_intel_bt_common(const struct acpi_gpio *enable_gpio,
|
|||
*/
|
||||
acpigen_write_method("BTRK", 1);
|
||||
{
|
||||
acpigen_write_if_lequal_op_int(ARG0_OP, 1);
|
||||
{
|
||||
/* De-assert reset */
|
||||
acpigen_disable_tx_gpio(reset_gpio);
|
||||
if (reset_gpio->pin_count) {
|
||||
acpigen_write_if_lequal_op_int(ARG0_OP, 1);
|
||||
{
|
||||
/* De-assert reset */
|
||||
acpigen_disable_tx_gpio(reset_gpio);
|
||||
}
|
||||
acpigen_write_else();
|
||||
{
|
||||
/* Assert Reset */
|
||||
acpigen_enable_tx_gpio(reset_gpio);
|
||||
}
|
||||
acpigen_pop_len();
|
||||
}
|
||||
acpigen_write_else();
|
||||
{
|
||||
/* Assert Reset */
|
||||
acpigen_enable_tx_gpio(reset_gpio);
|
||||
}
|
||||
acpigen_pop_len();
|
||||
}
|
||||
acpigen_pop_len();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue