On 6/29/24 7:22 PM, Marek Vasut wrote:
The Infineon CYW43439 Bluetooth device enters suspend mode right after receiving the Set_Sleepmode_Param sleep_mode=1 HCI command, even if the BT_DEV_WAKE input is HIGH, i.e. device ought to be awake. This triggers a timeout of any follow up HCI command, in case of regular boot, that is HCI_OP_RESET command issued from hci_init1_sync() . Rework the code such that during probe, the device is configured to not enter sleep mode by issuing Set_Sleepmode_Param sleep_mode=0 instead of sleep_mode=1 in bcm_setup(). Upon RPM suspend, issue Set_Sleepmode_Param with sleep_mode=1 to allow the device to enter the sleep mode when the BT_DEV_WAKE signal is deasserted, which is deasserted soon after in the RPM suspend callback. Upon RPM resume, assert BT_DEV_WAKE to resume the chip from sleep mode and then issue Set_Sleepmode_Param sleep_mode=0 to yet again prevent the device from entering sleep mode until the next RPM suspend.
Is there any feedback on this patch ?