From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: sean.wang@mediatek.com
Cc: Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Marcel Holtmann <marcel@holtmann.org>,
Johan Hedberg <johan.hedberg@gmail.com>,
devicetree <devicetree@vger.kernel.org>,
linux-bluetooth@vger.kernel.org,
linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@lists.infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 6/7] Bluetooth: mediatek: Add protocol support for MediaTek serial devices
Date: Wed, 27 Jun 2018 20:04:19 +0300 [thread overview]
Message-ID: <CAHp75VedHLw52J_ymh3iYf2w=r8d+Kqg=fJZmBGnaCrEbNEPdQ@mail.gmail.com> (raw)
In-Reply-To: <CAHp75VehTeyyzR4bPKK3hFDTVqZnhdNy5vcBFJCSH_Zrx+QrKA@mail.gmail.com>
On Wed, Jun 27, 2018 at 7:59 PM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Wed, Jun 27, 2018 at 8:43 AM, <sean.wang@mediatek.com> wrote:
>> From: Sean Wang <sean.wang@mediatek.com>
>>
>
>> +config BT_HCIBTUART_MTK
>> + tristate "MediaTek HCI UART driver"
>> + depends on BT_HCIBTUART
>
>> + default y
>
> Perhaps it's an overkill for users which would like to have less
> amount on stuff in kernel.
>
>
>> +#include <asm/unaligned.h>
>> +#include <linux/atomic.h>
>> +#include <linux/clk.h>
>> +#include <linux/firmware.h>
>> +#include <linux/module.h>
>> +#include <linux/pm_runtime.h>
>> +#include <linux/serdev.h>
Perhaps alphabetically ordered?
+ blank line.
>
>> +#include <net/bluetooth/bluetooth.h>
>> +#include <net/bluetooth/hci_core.h>
>> + /* Enable the power domain and clock the device requires. */
>> + pm_runtime_enable(dev);
>> + err = pm_runtime_get_sync(dev);
>> + if (err < 0)
>> + goto err_pm2;
Should be err_pm1 here.
Yes, that's correct.
>> +err_pm1:
>> + pm_runtime_put_sync(dev);
>> +err_pm2:
>> + pm_runtime_disable(dev);
>> +#define MTK_WMT_CMD_SIZE (MTK_WMT_HDR_SIZE + MTK_STP_HDR_SIZE + \
>> + MTK_STP_TLR_SIZE + HCI_ACL_HDR_SIZE)
It would look slightly better if you start on new line like
#define FOO \
(BAR + BAZ)
>> +struct mtk_stp_hdr {
>> + __u8 prefix;
>> + __u8 dlen1:4;
>> + __u8 type:4;
>> + __u8 dlen2:8;
u8 already 8 bit.
>> + __u8 cs;
>> +} __packed;
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2018-06-27 17:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-27 5:43 [PATCH v4 0/7] add support for Bluetooth on MT7622 SoC sean.wang
2018-06-27 5:43 ` [PATCH v4 1/7] dt-bindings: net: bluetooth: Add mediatek-bluetooth sean.wang
2018-06-27 5:43 ` [PATCH v4 2/7] serdev: add dev_pm_domain_attach|detach() sean.wang
2018-06-27 8:00 ` Ulf Hansson
2018-06-27 5:43 ` [PATCH v4 3/7] Bluetooth: Add new serdev based driver for UART attached controllers sean.wang
2018-06-27 5:43 ` [PATCH v4 4/7] Bluetooth: Add new quirk for non-persistent setup settings sean.wang
2018-06-27 5:43 ` [PATCH v4 5/7] Bluetooth: Extend btuart driver for join more vendor devices sean.wang
2018-06-27 5:43 ` [PATCH v4 6/7] Bluetooth: mediatek: Add protocol support for MediaTek serial devices sean.wang
2018-06-27 16:59 ` Andy Shevchenko
2018-06-27 17:04 ` Andy Shevchenko [this message]
2018-06-28 3:06 ` Sean Wang
2018-06-28 5:19 ` Johan Hovold
2018-06-29 9:47 ` Sean Wang
2018-06-28 2:54 ` Sean Wang
2018-06-27 5:43 ` [PATCH v4 7/7] 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='CAHp75VedHLw52J_ymh3iYf2w=r8d+Kqg=fJZmBGnaCrEbNEPdQ@mail.gmail.com' \
--to=andy.shevchenko@gmail.com \
--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=marcel@holtmann.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).