public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Venkata Lakshmi Narayana Gubba <gubbaven@codeaurora.org>
Cc: marcel@holtmann.org, johan.hedberg@gmail.com, mka@chromium.org,
	linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org,
	hemantg@codeaurora.org, linux-arm-msm@vger.kernel.org,
	bgodavar@codeaurora.org, rjliao@codeaurora.org,
	hbandi@codeaurora.org, abhishekpandit@chromium.org
Subject: Re: [RFC PATCH v1] Bluetooth: hci_qca: Add device_may_wakeup support
Date: Wed, 10 Mar 2021 09:02:37 -0600	[thread overview]
Message-ID: <YEjfjZ/5y+Z0r63Z@builder.lan> (raw)
In-Reply-To: <1615376496-13577-1-git-send-email-gubbaven@codeaurora.org>

On Wed 10 Mar 05:41 CST 2021, Venkata Lakshmi Narayana Gubba wrote:

> Added device_may_wakeup() support.

This would be an excellent place to describe _why_ this is necessary,
instead of just repeating $subject.

Something along the lines of the comment in the patch.

Regards,
Bjorn

> 
> Signed-off-by: Venkata Lakshmi Narayana Gubba <gubbaven@codeaurora.org>
> ---
>  drivers/bluetooth/hci_qca.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> index de36af6..73af901 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
> @@ -1571,6 +1571,20 @@ static void qca_cmd_timeout(struct hci_dev *hdev)
>  	mutex_unlock(&qca->hci_memdump_lock);
>  }
>  
> +static bool qca_prevent_wake(struct hci_dev *hdev)
> +{
> +	struct hci_uart *hu = hci_get_drvdata(hdev);
> +	bool wakeup;
> +
> +	/* UART driver handles the interrupt from BT SoC.So we need to use
> +	 * device handle of UART driver to get the status of device may wakeup.
> +	 */
> +	wakeup = device_may_wakeup(hu->serdev->ctrl->dev.parent);
> +	bt_dev_dbg(hu->hdev, "wakeup status : %d", wakeup);
> +
> +	return !wakeup;
> +}
> +
>  static int qca_wcn3990_init(struct hci_uart *hu)
>  {
>  	struct qca_serdev *qcadev;
> @@ -1721,6 +1735,7 @@ static int qca_setup(struct hci_uart *hu)
>  		qca_debugfs_init(hdev);
>  		hu->hdev->hw_error = qca_hw_error;
>  		hu->hdev->cmd_timeout = qca_cmd_timeout;
> +		hu->hdev->prevent_wake = qca_prevent_wake;
>  	} else if (ret == -ENOENT) {
>  		/* No patch/nvm-config found, run with original fw/config */
>  		set_bit(QCA_ROM_FW, &qca->flags);
> -- 
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member 
> of Code Aurora Forum, hosted by The Linux Foundation
> 

  parent reply	other threads:[~2021-03-10 15:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10 11:41 [RFC PATCH v1] Bluetooth: hci_qca: Add device_may_wakeup support Venkata Lakshmi Narayana Gubba
2021-03-10 12:11 ` [RFC,v1] " bluez.test.bot
2021-03-10 15:02 ` Bjorn Andersson [this message]
2021-03-11  6:01   ` [RFC PATCH v1] " gubbaven

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=YEjfjZ/5y+Z0r63Z@builder.lan \
    --to=bjorn.andersson@linaro.org \
    --cc=abhishekpandit@chromium.org \
    --cc=bgodavar@codeaurora.org \
    --cc=gubbaven@codeaurora.org \
    --cc=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 \
    --cc=mka@chromium.org \
    --cc=rjliao@codeaurora.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