<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/bluetooth/btmtkuart.c, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2019-05-31T13:43:26Z</updated>
<entry>
<title>Bluetooth: mediatek: Fixed incorrect type in assignment</title>
<updated>2019-05-31T13:43:26Z</updated>
<author>
<name>Sean Wang</name>
<email>sean.wang@mediatek.com</email>
</author>
<published>2019-03-05T00:14:25Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a07c802b2486e1a1982f1a1a3c037037e656fc14'/>
<id>urn:sha1:a07c802b2486e1a1982f1a1a3c037037e656fc14</id>
<content type='text'>
[ Upstream commit cac63f9b163700fb70a609ad220697c61b797d6b ]

Fixed warning: incorrect type in assignment reported by kbuild test robot.
The detailed warning is shown as below.

make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

All warnings (new ones prefixed by &gt;&gt;):

btmtkuart.c:671:18: sparse:    warning: incorrect type in assignment
			       (different base types)
btmtkuart.c:671:18: sparse:    expected unsigned int [usertype] baudrate
btmtkuart.c:671:18: sparse:    got restricted __le32 [usertype]

sparse warnings: (new ones prefixed by &gt;&gt;)
btmtkuart.c:671:18: sparse: warning: incorrect type in assignment
			       (different base types)
btmtkuart.c:671:18: sparse:    expected unsigned int [usertype] baudrate
btmtkuart.c:671:18: sparse:    got restricted __le32 [usertype]

vim +671 drivers/bluetooth/btmtkuart.c

   659
   660	static int btmtkuart_change_baudrate(struct hci_dev *hdev)
   661	{
   662		struct btmtkuart_dev *bdev = hci_get_drvdata(hdev);
   663		struct btmtk_hci_wmt_params wmt_params;
   664		u32 baudrate;
   665		u8 param;
   666		int err;
   667
   668		/* Indicate the device to enter the probe state the host is
   669		 * ready to change a new baudrate.
   670		 */
 &gt; 671		baudrate = cpu_to_le32(bdev-&gt;desired_speed);
   672		wmt_params.op = MTK_WMT_HIF;

Fixes: 22eaf6c9946a ("Bluetooth: mediatek: add support for MediaTek MT7663U and MT7668U UART devices")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: mediatek: add support for MediaTek MT7663U and MT7668U UART devices</title>
<updated>2019-03-02T18:51:23Z</updated>
<author>
<name>Sean Wang</name>
<email>sean.wang@mediatek.com</email>
</author>
<published>2019-03-02T18:44:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=22eaf6c9946ae269061d95bb9ceee02524166474'/>
<id>urn:sha1:22eaf6c9946ae269061d95bb9ceee02524166474</id>
<content type='text'>
This adds the support of enabling MT7663U and MT7668U Bluetooth function
running on the top of btmtkuart driver.

There are a few differences between MT766[3,8]U and MT7622 where
MT766[3,8]U are standalone devices based on UART transport while MT7622
bluetooth is a built-in device on MediaTek SoC communicating with the host
through BTIF serial transport. Thus, extra setup sequence is necessary
for these standalone devices such as remote regulator and reset control via
GPIO, baud rate changing handshake between the host and device and so on.

Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: mediatek: update the common setup between MT7622 and other devices</title>
<updated>2019-02-18T13:08:55Z</updated>
<author>
<name>Sean Wang</name>
<email>sean.wang@mediatek.com</email>
</author>
<published>2019-02-14T23:19:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e0b67035a90b58d01f911fed77b6e3da153da66e'/>
<id>urn:sha1:e0b67035a90b58d01f911fed77b6e3da153da66e</id>
<content type='text'>
Update the setup sequence on MT7622 to apply the same flow with MT7663U
and MT7668U USB [1] as much as possible. These additional commands are
required to parse the corresponding event to determine what current state
the Bluetooth device is on and thus it's necessary to extend
mtk_hci_wmt_sync to support the reading status in the same patch.

[1] http://lists.infradead.org/pipermail/linux-mediatek/2019-January/017074.html

Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: mediatek: pass a pointer to mtk_hci_wmt_sync</title>
<updated>2019-02-18T13:07:38Z</updated>
<author>
<name>Sean Wang</name>
<email>sean.wang@mediatek.com</email>
</author>
<published>2019-02-14T23:19:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=88e5f366a1903bfb717ad37a72f4657dae4d81da'/>
<id>urn:sha1:88e5f366a1903bfb717ad37a72f4657dae4d81da</id>
<content type='text'>
Pass a structure pointer to mtk_hci_wmt_sync rather than several arguments
to avoid take up additional stack area and be better to read the code.

Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: mediatek: fix up an error path to restore bdev-&gt;tx_state</title>
<updated>2019-02-18T13:06:38Z</updated>
<author>
<name>Sean Wang</name>
<email>sean.wang@mediatek.com</email>
</author>
<published>2019-02-14T23:19:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=77f328dbc6cf42f22c691a164958a5452142a542'/>
<id>urn:sha1:77f328dbc6cf42f22c691a164958a5452142a542</id>
<content type='text'>
Restore bdev-&gt;tx_state with clearing bit BTMTKUART_TX_WAIT_VND_EVT
when there is an error on waiting for the corresponding event.

Fixes: 7237c4c9ec92 ("Bluetooth: mediatek: Add protocol support for MediaTek serial devices")
Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: mediatek: trivial typo fix</title>
<updated>2019-02-18T13:05:29Z</updated>
<author>
<name>Sean Wang</name>
<email>sean.wang@mediatek.com</email>
</author>
<published>2019-02-14T23:19:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=adf5d73056d185eff31a04aa91f5cb0a2ae22152'/>
<id>urn:sha1:adf5d73056d185eff31a04aa91f5cb0a2ae22152</id>
<content type='text'>
add a trivial typo fix from speicfic to specific

Fixes: 7237c4c9ec92 ("Bluetooth: mediatek: Add protocol support for MediaTek serial devices")
Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: mediatek: Fix memory leak</title>
<updated>2018-08-21T14:56:20Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2018-08-14T15:10:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=addb3ffbca66954fb1d1791d2db2153c403f81af'/>
<id>urn:sha1:addb3ffbca66954fb1d1791d2db2153c403f81af</id>
<content type='text'>
In case memory resources for *fw* were allocated, release them before
return.

Addresses-Coverity-ID: 1472611 ("Resource leak")
Fixes: 7237c4c9ec92 ("Bluetooth: mediatek: Add protocol support for MediaTek serial devices")
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Acked-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: mediatek: pass correct size to h4_recv_buf()</title>
<updated>2018-08-13T13:59:39Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2018-08-13T09:32:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=330ad75f6a79d46f11f7bf8937852ebb4673b1d5'/>
<id>urn:sha1:330ad75f6a79d46f11f7bf8937852ebb4673b1d5</id>
<content type='text'>
We're supposed to pass the number of elements in the mtk_recv_pkts, not
the number of bytes.

Fixes: 7237c4c9ec92 ("Bluetooth: mediatek: Add protocol support for MediaTek serial devices")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: mediatek: Add protocol support for MediaTek serial devices</title>
<updated>2018-08-07T19:33:25Z</updated>
<author>
<name>Sean Wang</name>
<email>sean.wang@mediatek.com</email>
</author>
<published>2018-08-07T17:52:48Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7237c4c9ec92e1a4f6ef1f712bf9105d7b392c6a'/>
<id>urn:sha1:7237c4c9ec92e1a4f6ef1f712bf9105d7b392c6a</id>
<content type='text'>
This adds a driver based on serdev driver for the MediaTek serial protocol
based on running H:4, which can enable the built-in Bluetooth device inside
MT7622 SoC.

Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
</feed>
