From: Matthias Kaehlcke <mka@chromium.org>
To: Harish Bandi <c-hbandi@codeaurora.org>
Cc: marcel@holtmann.org, johan.hedberg@gmail.com,
linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org,
hemantg@codeaurora.org, linux-arm-msm@vger.kernel.org,
bgodavar@codeaurora.org, anubhavg@codeaurora.org
Subject: Re: [PATCH v1] Bluetooth: hci_qca: wait for Pre shutdown to command complete event before sending the Power off pulse
Date: Thu, 8 Aug 2019 07:59:09 -0700 [thread overview]
Message-ID: <20190808145909.GP250418@google.com> (raw)
In-Reply-To: <1565256353-4476-1-git-send-email-c-hbandi@codeaurora.org>
On Thu, Aug 08, 2019 at 02:55:53PM +0530, Harish Bandi wrote:
> When SoC receives pre shut down command, it share the same
> with other COEX shared clients. So SoC needs a short
> time after sending VS pre shutdown command before
> turning off the regulators and sending the power off pulse.
>
> Signed-off-by: Harish Bandi <c-hbandi@codeaurora.org>
> ---
> drivers/bluetooth/btqca.c | 5 +++--
> drivers/bluetooth/hci_qca.c | 2 ++
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
> index 2221935..f20991e 100644
> --- a/drivers/bluetooth/btqca.c
> +++ b/drivers/bluetooth/btqca.c
> @@ -106,8 +106,9 @@ int qca_send_pre_shutdown_cmd(struct hci_dev *hdev)
>
> bt_dev_dbg(hdev, "QCA pre shutdown cmd");
>
> - skb = __hci_cmd_sync(hdev, QCA_PRE_SHUTDOWN_CMD, 0,
> - NULL, HCI_INIT_TIMEOUT);
> + skb = __hci_cmd_sync_ev(hdev, QCA_PRE_SHUTDOWN_CMD, 0,
> + NULL, HCI_EV_CMD_COMPLETE, HCI_INIT_TIMEOUT);
> +
The commit message does not mention this change, it only talks about
adding a delay.
> if (IS_ERR(skb)) {
> err = PTR_ERR(skb);
> bt_dev_err(hdev, "QCA preshutdown_cmd failed (%d)", err);
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> index 16db6c0..566aa28 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
> @@ -1386,6 +1386,8 @@ static int qca_power_off(struct hci_dev *hdev)
> /* Perform pre shutdown command */
> qca_send_pre_shutdown_cmd(hdev);
>
> + usleep_range(8000, 10000);
> +
> qca_power_shutdown(hu);
> return 0;
> }
next prev parent reply other threads:[~2019-08-08 14:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-08 9:25 [PATCH v1] Bluetooth: hci_qca: wait for Pre shutdown to command complete event before sending the Power off pulse Harish Bandi
2019-08-08 10:55 ` Balakrishna Godavarthi
2019-08-09 4:51 ` Harish Bandi
2019-08-08 14:59 ` Matthias Kaehlcke [this message]
2019-08-09 5:12 ` Harish Bandi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190808145909.GP250418@google.com \
--to=mka@chromium.org \
--cc=anubhavg@codeaurora.org \
--cc=bgodavar@codeaurora.org \
--cc=c-hbandi@codeaurora.org \
--cc=hemantg@codeaurora.org \
--cc=johan.hedberg@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox