Return-Path: Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: [PATCH 2/3] Bluetooth: hci_bcm: Streamline runtime PM code From: Marcel Holtmann In-Reply-To: <1958f497c2710a67d3549122ee7bd71a69b0dd6c.1514143015.git.lukas@wunner.de> Date: Tue, 26 Dec 2017 21:57:23 +0100 Cc: Johan Hedberg , Mika Westerberg , Andy Shevchenko , Frederic Danis , Loic Poulain , Hans de Goede , Max Shavrick , Leif Liddy , Daniel Roschka , Ronald Tschalaer , "Peter Y. Chuang" , linux-bluetooth@vger.kernel.org Message-Id: References: <5e3106d673c3c41bf92c91f1f43bf30682511366.1514143015.git.lukas@wunner.de> <1958f497c2710a67d3549122ee7bd71a69b0dd6c.1514143015.git.lukas@wunner.de> To: Lukas Wunner Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi Lukas, > This driver seeks to force the Bluetooth device on for the duration of > 5 seconds when the Bluetooth device has woken the host and after a > complete packet has been received. It does that by calling: > > pm_runtime_get(); > pm_runtime_mark_last_busy(); > pm_runtime_put_autosuspend(); > > The same can be achieved more succinctly with: > > pm_request_resume(); > > That's because after runtime resuming the device, rpm_resume() invokes > pm_runtime_mark_last_busy() followed by rpm_idle(), which will cause > the device to be suspended after expiration of the autosuspend_delay. > > No functional change intended. > > Cc: Frédéric Danis > Signed-off-by: Lukas Wunner > --- > drivers/bluetooth/hci_bcm.c | 11 +++-------- > 1 file changed, 3 insertions(+), 8 deletions(-) patch has been applied to bluetooth-next tree. Regards Marcel