Return-Path: Date: Wed, 3 Jan 2018 14:22:21 +0100 From: Lukas Wunner To: Marcel Holtmann Cc: Hans de Goede , Johan Hedberg , Mika Westerberg , Andy Shevchenko , Frederic Danis , Loic Poulain , Max Shavrick , Leif Liddy , Daniel Roschka , Ronald Tschalaer , "Peter Y. Chuang" , linux-bluetooth@vger.kernel.org Subject: Re: [PATCH v2 03/10] Bluetooth: hci_bcm: Enable runtime PM despite absence of IRQ Message-ID: <20180103132221.GA17027@wunner.de> References: <36e7c22493235863c2ab9dd9d7aa382a3fc15675.1514916630.git.lukas@wunner.de> <20180102233648.GA15299@wunner.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: List-ID: On Wed, Jan 03, 2018 at 01:34:00PM +0100, Marcel Holtmann wrote: > > I notice that command 0xfc27 is used to write the sleep_params. > > Does anyone know the command to read them so that we can check the > > defaults Apple is using and find out if they can be optimized? > > the Read Sleepmode Param is 0xfc28 and requires no parameters. You can > check monitor/broadcom.c for a bunch of these commands since btmon will > decode them for you if possible. Might want to actually post the btmon > log of the init sequence here for reference (just blacklist the module > and load it manually after starting btmon). > > I thought that I created a Broadcom specific init that reads most of > the standard values so we have them for reference in the btmon logs. > However it seems I have not done that for Sleepmode Param at the moment. Thanks! I've now been able to dig up v1.6 of the Laird SD40 firmware datasheet. There's an incongruence between the datasheet and struct bcm_set_sleep_mode (as declared in drivers/bluetooth/btbcm.h and hci_bcm.c) wherein the order of pulsed_host_wake and break_to_host is reversed. The datasheet is dated Oct 2015, so fairly recent, making it appear more likely that the datasheet is correct and our code is wrong? Kind regards, Lukas