All of lore.kernel.org
 help / color / mirror / Atom feed
From: Balakrishna Godavarthi <bgodavar@codeaurora.org>
To: Matthias Kaehlcke <mka@chromium.org>
Cc: Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
	Hemantg <hemantg@codeaurora.org>
Subject: Re: [PATCH 3/3] Bluetooth: hci_qca: Add delay after power-off pulse
Date: Tue, 26 Feb 2019 17:49:56 +0530	[thread overview]
Message-ID: <558de0e85225baf7d9ab402cfbaab9c7@codeaurora.org> (raw)
In-Reply-To: <20190225234954.82942-4-mka@chromium.org>

On 2019-02-26 05:19, Matthias Kaehlcke wrote:
> During initialization the power-on pulse is currently sent inmediately
> after the prior power-off pulse. With this initialization often fails
> at boot time:
> 
> [   15.205224] Bluetooth: hci0: setting up wcn3990
> [   17.341062] Bluetooth: hci0: command 0xfc00 tx timeout
> [   22.101453] ERROR: Bluetooth initialization failed
> [   25.337740] Bluetooth: hci0: Reading QCA version information failed 
> (-110)
> 
> After a power-off pulse wait 10ms to give the controller time to power
> off.
> 
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> ---
>  drivers/bluetooth/hci_qca.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> index eacc108c422d0..c89c1ed87ffe9 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
> @@ -1036,8 +1036,11 @@ static int qca_send_power_pulse(struct hci_uart
> *hu, bool on)
>  	usleep_range(100, 200);
>  	hci_uart_set_flow_control(hu, false);
> 
> +	/* Give to controller time to boot/shutdown */
>  	if (on)
>  		msleep(100);
> +	else
> +		msleep(10);
> 
>  	return 0;
>  }

Reviewed-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>

-- 
Regards
Balakrishna.

      reply	other threads:[~2019-02-26 12:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-25 23:49 [PATCH 0/3] Bluetooth: hci_qca: Add delay after power-off pulse Matthias Kaehlcke
2019-02-25 23:49 ` [PATCH 1/3] Bluetooth: hci_qca: Pass boolean 'on/off' to qca_send_power_pulse() Matthias Kaehlcke
2019-02-26 12:16   ` Balakrishna Godavarthi
2019-02-25 23:49 ` [PATCH 2/3] Bluetooth: hci_qca: Move boot delay " Matthias Kaehlcke
2019-02-26 12:18   ` Balakrishna Godavarthi
2019-02-26 12:24     ` Balakrishna Godavarthi
2019-02-26 19:31       ` Matthias Kaehlcke
2019-02-25 23:49 ` [PATCH 3/3] Bluetooth: hci_qca: Add delay after power-off pulse Matthias Kaehlcke
2019-02-26 12:19   ` Balakrishna Godavarthi [this message]

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=558de0e85225baf7d9ab402cfbaab9c7@codeaurora.org \
    --to=bgodavar@codeaurora.org \
    --cc=hemantg@codeaurora.org \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=mka@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.