Linux bluetooth development
 help / color / mirror / Atom feed
From: Wren Turkal <wt@penguintechs.org>
To: Bartosz Golaszewski <brgl@bgdev.pl>,
	Marcel Holtmann <marcel@holtmann.org>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>,
	linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH 2/3] Bluetooth: hci_qca: fix QCA6390 support on non-DT platforms
Date: Wed, 7 Aug 2024 12:09:38 -0700	[thread overview]
Message-ID: <a3bd82fa-eb27-4a71-96d8-c768b9866bf1@penguintechs.org> (raw)
In-Reply-To: <20240731-hci_qca_fixes-v1-2-59dad830b243@linaro.org>

On 7/31/24 8:20 AM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> 
> QCA6390 can albo be used on non-DT systems so we must not make the power
> sequencing the only option. Check if the serdev device consumes an OF
> node. If so: honor the new contract as per the DT bindings. If not: fall
> back to the previous behavior by falling through to the existing
> default label.
> 
> Fixes: 9a15ce685706 ("Bluetooth: qca: use the power sequencer for QCA6390")
> Reported-by: Wren Turkal <wt@penguintechs.org>
> Closes: https://lore.kernel.org/linux-bluetooth/27e6a6c5-fb63-4219-be0b-eefa2c116e06@penguintechs.org/
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

Was this commit supposed to have a Tested-by: footer for me?

> ---
>   drivers/bluetooth/hci_qca.c | 13 ++++++++-----
>   1 file changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> index a20dd5015346..2baed7d0f479 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
> @@ -2412,11 +2412,14 @@ static int qca_serdev_probe(struct serdev_device *serdev)
>   		break;
>   
>   	case QCA_QCA6390:
> -		qcadev->bt_power->pwrseq = devm_pwrseq_get(&serdev->dev,
> -							   "bluetooth");
> -		if (IS_ERR(qcadev->bt_power->pwrseq))
> -			return PTR_ERR(qcadev->bt_power->pwrseq);
> -		break;
> +		if (dev_of_node(&serdev->dev)) {
> +			qcadev->bt_power->pwrseq = devm_pwrseq_get(&serdev->dev,
> +								   "bluetooth");
> +			if (IS_ERR(qcadev->bt_power->pwrseq))
> +				return PTR_ERR(qcadev->bt_power->pwrseq);
> +			break;
> +		}
> +		fallthrough;
>   
>   	default:
>   		qcadev->bt_en = devm_gpiod_get_optional(&serdev->dev, "enable",
> 

-- 
You're more amazing than you think!


  parent reply	other threads:[~2024-08-07 19:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-31 15:20 [PATCH 0/3] Bluetooth: hci_qca: fix post merge window regressions Bartosz Golaszewski
2024-07-31 15:20 ` [PATCH 1/3] Bluetooth: hci_qca: don't call pwrseq_power_off() twice for QCA6390 Bartosz Golaszewski
2024-07-31 15:58   ` Bluetooth: hci_qca: fix post merge window regressions bluez.test.bot
2024-07-31 15:20 ` [PATCH 2/3] Bluetooth: hci_qca: fix QCA6390 support on non-DT platforms Bartosz Golaszewski
2024-08-01  7:29   ` Paul Menzel
2024-08-01  7:39     ` Bartosz Golaszewski
2024-08-07 19:09   ` Wren Turkal [this message]
2024-08-08  7:49     ` Bartosz Golaszewski
2024-07-31 15:20 ` [PATCH 3/3] Bluetooth: hci_qca: fix a NULL-pointer derefence at shutdown Bartosz Golaszewski
2024-08-06 22:44   ` Nícolas F. R. A. Prado
2024-08-07  7:53     ` Bartosz Golaszewski
2024-08-07 15:03       ` Luiz Augusto von Dentz
2024-08-07 18:34         ` Nícolas F. R. A. Prado
2024-07-31 16:32 ` [PATCH 0/3] Bluetooth: hci_qca: fix post merge window regressions Luiz Augusto von Dentz
2024-08-01  3:57   ` Wren Turkal
2024-08-01  7:23     ` Wren Turkal
2024-08-01  8:20 ` patchwork-bot+bluetooth

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=a3bd82fa-eb27-4a71-96d8-c768b9866bf1@penguintechs.org \
    --to=wt@penguintechs.org \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=brgl@bgdev.pl \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=luiz.von.dentz@intel.com \
    --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