From: Krzysztof Kozlowski <krzk@kernel.org>
To: Zhangchao Zhang <ot_zhangchao.zhang@mediatek.com>,
Marcel Holtmann <marcel@holtmann.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Luiz Von Dentz <luiz.dentz@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>
Cc: Sean Wang <sean.wang@mediatek.com>,
Deren Wu <deren.Wu@mediatek.com>,
Chris Lu <chris.lu@mediatek.com>, Hao Qin <Hao.qin@mediatek.com>,
linux-bluetooth <linux-bluetooth@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
linux-mediatek <linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH v4 1/1] Bluetooth: mediatek: add gpio pin to reset bt
Date: Mon, 23 Jun 2025 13:55:50 +0200 [thread overview]
Message-ID: <3df0b3f2-0d73-4116-8bbf-37020892e773@kernel.org> (raw)
In-Reply-To: <20250623102359.2684-2-ot_zhangchao.zhang@mediatek.com>
On 23/06/2025 12:23, Zhangchao Zhang wrote:
> Makes the platform Bluetooth to be reset by hardware pin,
> it provides two methods to do it for mediatek controller,
> and it has been tested locally many times and can reset normally.
>
> When an exception occurs, resetting Bluetooth by hardware pin
> is more stable than resetting Bluetooth by software.
> If the corresponding pin is not found in dts,
> bluetooth can also be reset successfully.
>
> Co-developed: Hao Qin <hao.qin@mediatek.com>
> Co-developed: Chris Lu <chris.lu@mediatek.com>
> Co-developed: Jiande Lu <jiande.lu@mediatek.com>
> Signed-off-by: Zhangchao Zhang <ot_zhangchao.zhang@mediatek.com>
> ---
> drivers/bluetooth/btmtk.c | 69 +++++++++++++++++++++++++++++++++++++++
> drivers/bluetooth/btmtk.h | 5 +++
> 2 files changed, 74 insertions(+)
>
> diff --git a/drivers/bluetooth/btmtk.c b/drivers/bluetooth/btmtk.c
> index 4390fd571dbd..3e5f3ca6f0d5 100644
> --- a/drivers/bluetooth/btmtk.c
> +++ b/drivers/bluetooth/btmtk.c
> @@ -6,6 +6,8 @@
> #include <linux/firmware.h>
> #include <linux/usb.h>
> #include <linux/iopoll.h>
> +#include <linux/of.h>
> +#include <linux/of_gpio.h>
> #include <linux/unaligned.h>
>
> #include <net/bluetooth/bluetooth.h>
> @@ -109,6 +111,65 @@ static void btmtk_coredump_notify(struct hci_dev *hdev, int state)
> }
> }
>
> +static void btmtk_reset_by_gpio_work(struct work_struct *work)
> +{
> + struct btmtk_reset_gpio *reset_gpio_data =
> + container_of(work, struct btmtk_reset_gpio, reset_work.work);
> +
> + gpio_direction_output(reset_gpio_data->gpio_number, 1);
> + kfree(reset_gpio_data);
> +}
> +
> +static int btmtk_reset_by_gpio(struct hci_dev *hdev)
> +{
> + struct btmtk_data *data = hci_get_priv(hdev);
> + struct btmtk_reset_gpio *reset_gpio_data;
> + struct device_node *node;
> + int reset_gpio_number;
> +
> + node = of_find_compatible_node(NULL, NULL, "mediatek,usb-bluetooth");
Can you finally respond to the comments you got weeks ago at v1?
NAK and I will keep NAKing your patches because total disregard to
review is not going to make this patch accepted.
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-06-23 11:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-23 10:23 [PATCH v4 0/1] Bluetooth: mediatek: add gpio pin to reset bt Zhangchao Zhang
2025-06-23 10:23 ` [PATCH v4 1/1] " Zhangchao Zhang
2025-06-23 11:06 ` bluez.test.bot
2025-06-23 11:55 ` Krzysztof Kozlowski [this message]
2025-06-23 17:30 ` [PATCH v4 1/1] " Luiz Augusto von Dentz
2025-06-23 11:55 ` [PATCH v4 0/1] " Krzysztof Kozlowski
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=3df0b3f2-0d73-4116-8bbf-37020892e773@kernel.org \
--to=krzk@kernel.org \
--cc=Hao.qin@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chris.lu@mediatek.com \
--cc=deren.Wu@mediatek.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=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=matthias.bgg@gmail.com \
--cc=ot_zhangchao.zhang@mediatek.com \
--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