public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: quic_zijuhu <quic_zijuhu@quicinc.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Marcel Holtmann <marcel@holtmann.org>,
	<linux-bluetooth@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Wren Turkal <wt@penguintechs.org>,
	<torvalds@linux-foundation.org>,
	<--cc=regressions@lists.linux.dev>,
	Greg KH <gregkh@linuxfoundation.org>
Subject: Re: [PATCH v2] Bluetooth: qca: set power_ctrl_enabled on NULL returned by gpiod_get_optional()
Date: Wed, 24 Apr 2024 23:57:44 +0800	[thread overview]
Message-ID: <f23212ed-c986-46ff-ba8a-e6fe6418bb8a@quicinc.com> (raw)
In-Reply-To: <e39038e2-4e61-4e28-93da-8137aa14ad51@quicinc.com>

On 4/24/2024 11:47 PM, quic_zijuhu wrote:
> On 4/24/2024 11:41 PM, Luiz Augusto von Dentz wrote:
>> Hi Quic_zijuhu,
>>
>> On Wed, Apr 24, 2024 at 11:35 AM quic_zijuhu <quic_zijuhu@quicinc.com> wrote:
>>>
>>> On 4/24/2024 11:31 PM, Bartosz Golaszewski wrote:
>>>> On Wed, Apr 24, 2024 at 5:30 PM quic_zijuhu <quic_zijuhu@quicinc.com> wrote:
>>>>>
>>>>> On 4/24/2024 11:24 PM, quic_zijuhu wrote:
>>>>>> On 4/24/2024 10:52 PM, Bartosz Golaszewski wrote:
>>>>>>> On Wed, 24 Apr 2024 at 16:46, Krzysztof Kozlowski
>>>>>>> <krzysztof.kozlowski@linaro.org> wrote:
>>>>>>>>
>>>>>>>> On 24/04/2024 14:29, Bartosz Golaszewski wrote:
>>>>>>>>> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>>>>>>>>>
>>>>>>>>
>>>>>>>>>               qcadev->susclk = devm_clk_get_optional(&serdev->dev, NULL);
>>>>>>>>>               if (IS_ERR(qcadev->susclk)) {
>>>>>>>>> @@ -2355,10 +2360,13 @@ static int qca_serdev_probe(struct serdev_device *serdev)
>>>>>>>>>               qcadev->bt_en = devm_gpiod_get_optional(&serdev->dev, "enable",
>>>>>>>>>                                              GPIOD_OUT_LOW);
>>>>>>>>>               if (IS_ERR(qcadev->bt_en)) {
>>>>>>>>> -                     dev_warn(&serdev->dev, "failed to acquire enable gpio\n");
>>>>>>>>> -                     power_ctrl_enabled = false;
>>>>>>>>> +                     dev_err(&serdev->dev, "failed to acquire enable gpio\n");
>>>>>>>>> +                     return PTR_ERR(qcadev->bt_en);
>>>>>> please think about for QCA2066. if it is returned from here.  BT will
>>>>>> not working at all.  if you don't return here. i will be working fine
>>>>>> for every BT functionality.
>>>>> sorry, correct a type error, it is QCA6390 not QCA2066.
>>>>
>>>> Doesn't matter. If enable-gpios is not there, gpiod_get_optional()
>>>> will return NULL and we will not return.
>>>>
>>> i think i need to explain more for my consider case.
>>> let me take QCA6390,  if the property enable-gpios is configured.
>>> but IS_ERR(qcadev->bt_en) case happens, your change will do error
>>> return, so BT will not work at all
>>>
>>> but if you don't do error return, BT will working fine.
>>>
>>> so your fix is not right regarding QCA6390.
>>
>> Actually I'd say he is probably right with respect to DT because that
>> seems to require GPIO, we probably need a clearer way to differentiate
>> if a device is being set up via DT or not (btattach), in any case DT
>> is probably preferable thus why I went ahead and applied this one.
>>
> for QCA6390, i can confirm that enable-gpios is optional. it is bring-up
> by my team. i can confirm reporter's machine don't config the GPIO pin.
> DTS binding spec also don't mark it as required.
> 
> that is why i change my changing from initial reverting the whole change
> to only focus on QCA6390 that is the machine reported the issue.
> 
> 
>>>> Bart
>>>>
>>>>>> NAK again by me.
>>>>>>
>>>>>>>>>               }
>>>>>>>>>
>>>>>>>>> +             if (!qcadev->bt_en)
>>>>>>>>> +                     power_ctrl_enabled = false;
>>>>>>>>
>>>>>>>> This looks duplicated - you already have such check earlier.
>>>>>>>>
>>>>>>>
>>>>>>> It's under a different switch case!
>>>>>>>
>>>>>>> Bartosz
>>>>>>
>>>>>>
>>>>>
>>>
>>
>>
> 
> 
i find the change have been merged.
i think it is not good manner to merge change in this way even if i give
reasonable doubt


  reply	other threads:[~2024-04-24 15:57 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-24 12:29 [PATCH v2] Bluetooth: qca: set power_ctrl_enabled on NULL returned by gpiod_get_optional() Bartosz Golaszewski
2024-04-24 12:35 ` quic_zijuhu
2024-04-24 12:59 ` quic_zijuhu
2024-04-24 13:15   ` Wren Turkal
2024-04-24 13:10 ` Wren Turkal
2024-04-24 13:18   ` Bartosz Golaszewski
2024-04-24 13:22     ` quic_zijuhu
2024-04-24 13:31       ` Wren Turkal
2024-04-24 13:36         ` quic_zijuhu
2024-04-24 13:40           ` Wren Turkal
2024-04-24 13:39         ` Bartosz Golaszewski
2024-04-24 13:16 ` [v2] " bluez.test.bot
2024-04-24 14:46 ` [PATCH v2] " Krzysztof Kozlowski
2024-04-24 14:52   ` Bartosz Golaszewski
2024-04-24 15:05     ` Krzysztof Kozlowski
2024-04-24 15:24     ` quic_zijuhu
2024-04-24 15:29       ` quic_zijuhu
2024-04-24 15:31         ` Bartosz Golaszewski
2024-04-24 15:35           ` quic_zijuhu
2024-04-24 15:41             ` Luiz Augusto von Dentz
2024-04-24 15:47               ` quic_zijuhu
2024-04-24 15:57                 ` quic_zijuhu [this message]
2024-04-24 15:30       ` Bartosz Golaszewski
2024-04-24 15:31       ` Krzysztof Kozlowski
2024-04-24 15:40 ` patchwork-bot+bluetooth
2024-04-26 14:37   ` Bartosz Golaszewski
2024-04-26 15:09     ` Luiz Augusto von Dentz
2024-04-26 17:23       ` Bartosz Golaszewski

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=f23212ed-c986-46ff-ba8a-e6fe6418bb8a@quicinc.com \
    --to=quic_zijuhu@quicinc.com \
    --cc=--cc=regressions@lists.linux.dev \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=brgl@bgdev.pl \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=torvalds@linux-foundation.org \
    --cc=wt@penguintechs.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