[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3df0b3f2-0d73-4116-8bbf-37020892e773@kernel.org>
Date: Mon, 23 Jun 2025 13:55:50 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Zhangchao Zhang <ot_zhangchao.zhang@...iatek.com>,
Marcel Holtmann <marcel@...tmann.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Luiz Von Dentz <luiz.dentz@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
Cc: Sean Wang <sean.wang@...iatek.com>, Deren Wu <deren.Wu@...iatek.com>,
Chris Lu <chris.lu@...iatek.com>, Hao Qin <Hao.qin@...iatek.com>,
linux-bluetooth <linux-bluetooth@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
linux-mediatek <linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH v4 1/1] Bluetooth: mediatek: add gpio pin to reset bt
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@...iatek.com>
> Co-developed: Chris Lu <chris.lu@...iatek.com>
> Co-developed: Jiande Lu <jiande.lu@...iatek.com>
> Signed-off-by: Zhangchao Zhang <ot_zhangchao.zhang@...iatek.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
Powered by blists - more mailing lists