From: Marcel Holtmann <marcel@holtmann.org>
To: Sean Wang <sean.wang@mediatek.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
devicetree <devicetree@vger.kernel.org>,
Johan Hedberg <johan.hedberg@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"open list:BLUETOOTH DRIVERS" <linux-bluetooth@vger.kernel.org>,
Rob Herring <robh+dt@kernel.org>,
linux-mediatek@lists.infradead.org,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v7 2/3] Bluetooth: mediatek: Add protocol support for MediaTek serial devices
Date: Tue, 7 Aug 2018 17:54:53 +0200 [thread overview]
Message-ID: <8AF72CFC-4978-42AD-8ECC-752EB137DD2A@holtmann.org> (raw)
In-Reply-To: <1533652445.3472.230.camel@mtkswgap22>
Hi Sean,
>>>> this is even more hackish since the __hci_cmd_sync_ev command is really meant to get a cmd status first before waiting for that event.
>>>>
>>>
>>> Understood.
>>>
>>> I've stopped the hack in v8. could we merge v8 first ? and then I will a fix up with __hci_raw_sync_ev that uses the hdev->raw_q instead of __hci_cmd_sync_ev in TODO.
>>
>> so I looked into this a bit more. We actually added __hci_cmd_send for a Qualcomm firmware loader that was doing something similar. So instead of trying to add a yet another command to the core, I actually used that and implemented the wait for vendor event in the driver.
>>
>> You will see my v9 on the mailing list. I also did a bunch of cosmetic minor cleanup and spelling correction. Please test this version. I also make __le16 dlen instead of dlen1 + dlen2 since I think that is what your hardware does.
>
> Only one thing needs to be corrected in v9. that is __be16 is required instead of dlen1 + dlen2. I will fix it up in v10 and the other changes all look good to me.
>
>> If this version of the driver works for you then I am happy to merge it. You can then add support for hdev->set_bdaddr and hdev->set_diag in later patches. I also like to clean up the STP receive handler since it can be done a lot simpler and smaller, but that has to wait.
>>
>
> hopefully v10 also can be merged :)
send me a v10 and I can merge it.
> I will investigate more about how to add ->set_bdaddr, ->set_diag and STP receive enhancement in later patches.
>
> but so far I have not much idea about how to make STP multiplexer be a independent driver.
>
> my thought is that it would be really better and cleaner a chain of serdev is be used as the base of mtkbtuart. something like
>
> 8250 serial bus <----> STP multiplexer serdev <----> mtkbtuart serdev
>
> however, STP multiplexer serdev is not a real device, that doesn't no request any resource. I think it should not be allowed to be added in a device tree and even in dt-binding document.
Before we do that, lets get a cleaner parser for it. I just don’t have enough time to wrap my head around this one yet.
>>>> Are all Mediatek vendor commands this way? Or just the ones for loading the firmware? So only the WMT ones?
>>>>
>>>
>>> Only the WMT ones, WMT commands/events are usually used in system controlling, for example, global function on/off, firmware download, reset and so on. most only appear on device initialization
>>
>> Since you never checked the result of the vendor event, I opted for just signaling that it arrived. If they can report success or failure, we need to add some extra code for that.
>>
>
> I will consider more WMT event status when I add more Bluetooth devices such as MT7668U usb based Bluetooth which I plan to add the support in later patches in the next weeks
Are the USB ones also using STP or are they H:2 based like all the others. What are prominent MT7668U based ones that I could buy?
Regards
Marcel
next prev parent reply other threads:[~2018-08-07 15:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-31 17:14 [PATCH v7 0/3] add support for Bluetooth on MT7622 SoC sean.wang
2018-07-31 17:14 ` [PATCH v7 1/3] dt-bindings: net: bluetooth: Add mediatek-bluetooth sean.wang
2018-07-31 17:14 ` [PATCH v7 2/3] Bluetooth: mediatek: Add protocol support for MediaTek serial devices sean.wang
2018-08-01 7:53 ` Marcel Holtmann
2018-08-02 6:53 ` Sean Wang
2018-08-02 7:38 ` Marcel Holtmann
2018-08-02 8:48 ` Sean Wang
2018-08-02 9:45 ` Marcel Holtmann
2018-08-02 10:24 ` Sean Wang
2018-08-03 12:51 ` Marcel Holtmann
2018-08-03 13:42 ` Sean Wang
2018-08-03 17:19 ` Marcel Holtmann
2018-08-03 18:00 ` Sean Wang
2018-08-06 15:39 ` Marcel Holtmann
2018-08-07 14:34 ` Sean Wang
2018-08-07 15:54 ` Marcel Holtmann [this message]
2018-08-08 8:04 ` Sean Wang
2018-08-08 14:07 ` Marcel Holtmann
2018-07-31 17:15 ` [PATCH v7 3/3] MAINTAINERS: add an entry for MediaTek Bluetooth driver sean.wang
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=8AF72CFC-4978-42AD-8ECC-752EB137DD2A@holtmann.org \
--to=marcel@holtmann.org \
--cc=devicetree@vger.kernel.org \
--cc=johan.hedberg@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=sean.wang@mediatek.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).