All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Archie Pusaka <apusaka@google.com>
Cc: linux-bluetooth <linux-bluetooth@vger.kernel.org>,
	CrosBT Upstreaming <chromeos-bluetooth-upstreaming@chromium.org>,
	Archie Pusaka <apusaka@chromium.org>,
	Abhishek Pandit-Subedi <abhishekpandit@chromium.org>,
	Hilda Wu <hildawu@realtek.com>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] Bluetooth: hci_h5: add WAKEUP_DISABLE flag
Date: Thu, 29 Jul 2021 13:54:13 +0200	[thread overview]
Message-ID: <F610BDE8-CC34-4665-91D8-C32EDFD73F75@holtmann.org> (raw)
In-Reply-To: <CAJQfnxFikFjkGn6_+n=ycH4byzTMWY51C=+VJOycg_ZXmg=qqA@mail.gmail.com>

Hi Archie,

>>>>> Some RTL chips resets the FW on suspend, so wakeup is disabled on
>>>>> those chips. This patch introduces this WAKEUP_DISABLE flag so that
>>>>> chips that doesn't reset FW on suspend can leave the flag unset and
>>>>> is allowed to wake the host.
>>>>> 
>>>>> This patch also left RTL8822 WAKEUP_DISABLE flag unset, therefore
>>>>> allowing it to wake the host, and preventing reprobing on resume.
>>>>> 
>>>>> Signed-off-by: Archie Pusaka <apusaka@chromium.org>
>>>>> Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
>>>>> Reviewed-by: Hilda Wu <hildawu@realtek.com>
>>>>> 
>>>>> ---
>>>>> 
>>>>> Changes in v2:
>>>>> * Remove unnecessary variable
>>>>> 
>>>>> drivers/bluetooth/hci_h5.c | 83 +++++++++++++++++++++++++++-----------
>>>>> 1 file changed, 59 insertions(+), 24 deletions(-)
>>>> 
>>>> so the set does not apply cleanly to bluetooth-next
>>>> 
>>>> Applying: Bluetooth: hci_h5: Add runtime suspend
>>>> error: patch failed: drivers/bluetooth/hci_h5.c:11
>>>> error: drivers/bluetooth/hci_h5.c: patch does not apply
>>> 
>>> Hmm, it applies cleanly for me. Not sure what's going on.
>>> Anyway I rebased and made a little change as v3, please take a look!
>> 
>> the v3 applied cleanly.
>> 
>>>> 
>>>> 
>>>> And I am really close to not accepting any patches for hci_h5.c anymore. This thing turns into crazy hacking and nobody is taking my hint to redo this as clean H:5 3-Wire serdev standalone driver.
>>> 
>>> Pardon my unfamiliarity, but could you share more about your vision of
>>> a clean h5 driver? Should the RTL component be moved out to btrtl?
>>> Do we have something as a reference?
>> 
>> so a while back I send a bt3wire.c sample driver around. That would be a good starting point.
>> 
>> Anyhow, the problem is that hci_uart.ko is inherent a line discipline driver from 2.4.x kernel days and it has been stacked and hacked on top of it. It has become a burden, especially in the light that you can have clean serdev based drivers now (like btmtkuart.c).
>> 
>> And yes, it would be following the 3-Wire H:5 spec and then deal with vendor specific details like btusb.c for example. And my hope would be that especially in the Realtek and Broadcom (RPi3 etc.) cases this can move into vendor specific blocks and shared between USB and UART transports.
>> 
>> I also send around a btuart.c sample driver that is solely serdev based and should replace all the cases where we have H:4 as transport.
>> 
> 
> Thanks for the pointers!
> 
> The files you mentioned are rather hard to find, so below I paste the
> URL where I found them in case anyone else is also interested.
> 
> [RFC v2] Bluetooth: Add new serdev based driver for UART attached controllers
> https://www.spinics.net/lists/linux-bluetooth/msg74918.html
> 
> [RFC] Bluetooth: Add new serdev based driver for 3-Wire attached controllers
> https://www.spinics.net/lists/linux-bluetooth/msg74839.html

exactly these. I posted my initial work so that it can be continued by people with easier access to hardware.

Regards

Marcel


      reply	other threads:[~2021-07-29 11:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 14:51 [PATCH v2 1/3] Bluetooth: hci_h5: add WAKEUP_DISABLE flag Archie Pusaka
2021-07-15 14:51 ` [PATCH v2 2/3] Bluetooth: hci_h5: btrtl: Maintain flow control if wakeup is enabled Archie Pusaka
2021-07-15 14:52 ` [PATCH v2 3/3] Bluetooth: hci_h5: Add runtime suspend Archie Pusaka
2021-07-15 16:15 ` [v2,1/3] Bluetooth: hci_h5: add WAKEUP_DISABLE flag bluez.test.bot
2021-07-22 14:32 ` [PATCH v2 1/3] " Marcel Holtmann
2021-07-23 11:42   ` Archie Pusaka
2021-07-23 12:17     ` Marcel Holtmann
2021-07-26  4:02       ` Archie Pusaka
2021-07-29 11:54         ` Marcel Holtmann [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=F610BDE8-CC34-4665-91D8-C32EDFD73F75@holtmann.org \
    --to=marcel@holtmann.org \
    --cc=abhishekpandit@chromium.org \
    --cc=apusaka@chromium.org \
    --cc=apusaka@google.com \
    --cc=chromeos-bluetooth-upstreaming@chromium.org \
    --cc=hildawu@realtek.com \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    /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.