On Wed, Jun 27, 2018 at 7:59 PM, Andy Shevchenko
[off-list ref] wrote:
On Wed, Jun 27, 2018 at 8:43 AM, [off-list ref] wrote:
quoted
From: Sean Wang <sean.wang@mediatek.com>
quoted
+config BT_HCIBTUART_MTK
+ tristate "MediaTek HCI UART driver"
+ depends on BT_HCIBTUART
quoted
+ default y
Perhaps it's an overkill for users which would like to have less
amount on stuff in kernel.
quoted
+#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.
quoted
+#include <net/bluetooth/bluetooth.h>
+#include <net/bluetooth/hci_core.h>
quoted
+ /* 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.
quoted
+err_pm1:
+ pm_runtime_put_sync(dev);
+err_pm2:
+ pm_runtime_disable(dev);
quoted
+#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)
quoted
+struct mtk_stp_hdr {
+ __u8 prefix;
+ __u8 dlen1:4;
+ __u8 type:4;
quoted
+ __u8 dlen2:8;
u8 already 8 bit.
quoted
+ __u8 cs;
+} __packed;
--
With Best Regards,
Andy Shevchenko