From patchwork Tue Nov 8 05:55:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dominique Martinet X-Patchwork-Id: 16883 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2515410wru; Mon, 7 Nov 2022 22:19:46 -0800 (PST) X-Google-Smtp-Source: AMsMyM6VPNUt+IrNoMomDLrXxAVZpTzHIP0cvR+TKihXjYFcQiSVq0TvzfFWzbXlldAVbcyOiV67 X-Received: by 2002:a17:902:b94c:b0:178:336f:13d6 with SMTP id h12-20020a170902b94c00b00178336f13d6mr55635191pls.64.1667888386554; Mon, 07 Nov 2022 22:19:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667888386; cv=none; d=google.com; s=arc-20160816; b=hc6td09nHpsRx/1WLzUGPPnco4Rtkw1WRPiGzwwOAMxqL8NGas0cztOoWkzeKlU/mR D8kADWvtgl5rObvlNaL8kd0JHsJg+5xtetfOnikrczVtiVPD/lofv11sYNwW462oEVvl f6NXziRm5hVitU95/ufsu1AIVZ9p/dU7N4Up4B8CdZR+OLcWqg9ApSdPjw6R6tszK2Gu BjpyZ8Z6q7cxnBUgPEzK5zu3qEgqZWx2fRjqmrpKXvB2dh00wefTDI7zF/VyEuliAtWz AqeuiouM7+Jufb6rgch5DaEFq0vuQ+n0u5/aYSn9zB75WlhKOiJCNpl3M7WVjyTctuUi LCIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=a8ltF6Z7hveQcIoHTD+Ocqy8FGU/fVCDeqON4Kuh0Nw=; b=BpPJD4xXoSXEE2lLLXv7hbwqOcxemlljAEBDhrmHXoVsgVESLXLRF6ZQRrT+4atx6P 0BqFmRgXq8qs926kOgjVYvdUDQ8YFZMtTuiPc7pEGy/TW+16HXxbCoIkhnoiCX3t+skh iUTXj2rOuUnQg5muggev55h5V3JAqMMhAjC0E+u3tvjaLq0w5cWCwJJMTp4m5ZYplX4M 6YV4d6jOAS4aMfxr37VfnWyXqr2CdiSp4mcYg7lrnIm4dg6ntE21i8gA1Bpk6VoKhFO+ AI21lV3pfgKtjHtH/iXgCxOiY6jzEq+ukml4EUbiWB/ztqlhyV5U83uwP1+3Ixvrje6a Jx1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l13-20020a17090a660d00b001f4fc7af64esi14781492pjj.101.2022.11.07.22.19.34; Mon, 07 Nov 2022 22:19:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233379AbiKHGLM (ORCPT + 99 others); Tue, 8 Nov 2022 01:11:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233354AbiKHGLJ (ORCPT ); Tue, 8 Nov 2022 01:11:09 -0500 Received: from gw.atmark-techno.com (gw.atmark-techno.com [13.115.124.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D98431E73A for ; Mon, 7 Nov 2022 22:11:08 -0800 (PST) Received: from gw.atmark-techno.com (localhost [127.0.0.1]) by gw.atmark-techno.com (Postfix) with ESMTP id ED03C600F5 for ; Tue, 8 Nov 2022 14:56:02 +0900 (JST) Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by gw.atmark-techno.com (Postfix) with ESMTPS id B4E4E600F5 for ; Tue, 8 Nov 2022 14:56:02 +0900 (JST) Received: by mail-pl1-f197.google.com with SMTP id c7-20020a170903234700b0018729febd96so10567668plh.19 for ; Mon, 07 Nov 2022 21:56:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=a8ltF6Z7hveQcIoHTD+Ocqy8FGU/fVCDeqON4Kuh0Nw=; b=LDYVmH0KvHpUQ2rFLx8XGWt4/O4UMHBZQYLiyx188V92CBJdJjUklThJ+tvoGjxqEc DOdQKoOxXyrQX+CDAumGc3PzbSoOVGMU7BnC7v6qxNu663eG53bDQX4ZVKLhGB5mZI0Q wroyj6NG6SML2BuzfChtfkXWVAyv8jsIT1QnQNkiWIX9ekZDaZfr3ekj/BJRFQFuUVG4 uk0X4tii2+xnbwKtGzXqQtvZi7rSz7yyliHeTS00IwOcEIX7abjMZFXXP/fYiQcZ1WnF c8jbmjmOs5/3yCcf/q8dT4kUeZy1tXJiJq01OOnAZKM3DbbAeI59zh7TLrduBVlMwZ8b iA5A== X-Gm-Message-State: ACrzQf22NocUi3OWmop84qjLo/ZQCQ+5/3kF/dbK5Z27Bo3G19y3+FPE aYUW1FZ6JErhZ1keUFonbm7hsxGCX69Z5vZW3Dv8rgRReIniHN1eWUQ4qGZW6Bo97OhOpuJ/r6x y0Li2tPRbfCedR3D7fS+CZObu+to+ X-Received: by 2002:a17:902:c948:b0:187:2d90:9fab with SMTP id i8-20020a170902c94800b001872d909fabmr38509295pla.42.1667886962294; Mon, 07 Nov 2022 21:56:02 -0800 (PST) X-Received: by 2002:a17:902:c948:b0:187:2d90:9fab with SMTP id i8-20020a170902c94800b001872d909fabmr38509273pla.42.1667886962062; Mon, 07 Nov 2022 21:56:02 -0800 (PST) Received: from pc-zest.atmarktech (103.131.189.35.bc.googleusercontent.com. [35.189.131.103]) by smtp.gmail.com with ESMTPSA id q8-20020a170902a3c800b00186ad73e2d5sm5950422plb.208.2022.11.07.21.56.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Nov 2022 21:56:01 -0800 (PST) Received: from martinet by pc-zest.atmarktech with local (Exim 4.96) (envelope-from ) id 1osHaa-0098Kr-1g; Tue, 08 Nov 2022 14:56:00 +0900 From: Dominique Martinet To: Marcel Holtmann , Rob Herring , Krzysztof Kozlowski , Luiz Augusto von Dentz , Johan Hedberg Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-bluetooth@vger.kernel.org, Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S . Miller" , mizo@atmark-techno.com, Dominique Martinet Subject: [RFC PATCH 1/2] dt-bindings: net: h4-bluetooth: add new bindings for hci_h4 Date: Tue, 8 Nov 2022 14:55:30 +0900 Message-Id: <20221108055531.2176793-2-dominique.martinet@atmark-techno.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221108055531.2176793-1-dominique.martinet@atmark-techno.com> References: <20221108055531.2176793-1-dominique.martinet@atmark-techno.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748907732625427016?= X-GMAIL-MSGID: =?utf-8?q?1748907732625427016?= Add devicetree binding to support defining a bluetooth device using the h4 uart protocol This was tested with a NXP wireless+BT AW-XM458 module, but might benefit others as the H4 protocol seems often used. Signed-off-by: Dominique Martinet --- .../devicetree/bindings/net/h4-bluetooth.yaml | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/h4-bluetooth.yaml diff --git a/Documentation/devicetree/bindings/net/h4-bluetooth.yaml b/Documentation/devicetree/bindings/net/h4-bluetooth.yaml new file mode 100644 index 000000000000..5d11b89ca386 --- /dev/null +++ b/Documentation/devicetree/bindings/net/h4-bluetooth.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/h4-bluetooth.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: H4 Bluetooth + +maintainers: + - Dominique Martinet + +description: + H4 is a common bluetooth over uart protocol. + For example, the AW-XM458 is a WiFi + BT module where the WiFi part is + connected over PCI (M.2), while BT is connected over serial speaking + the H4 protocol. Its firmware is sent on the PCI side. + +properties: + compatible: + enum: + - nxp,aw-xm458-bt + + max-speed: true + +required: + - compatible + +additionalProperties: false + +examples: + - | + #include + #include + + uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart1>; + assigned-clocks = <&clk IMX8MP_CLK_UART1>; + assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_80M>; + status = "okay"; + fsl,dte-mode = <1>; + fsl,uart-has-rtscts; + + + bluetooth { + compatible = "nxp,aw-xm458-bt"; + max-speed = <3000000>; + }; + }; From patchwork Tue Nov 8 05:55:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dominique Martinet X-Patchwork-Id: 16881 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2514958wru; Mon, 7 Nov 2022 22:18:29 -0800 (PST) X-Google-Smtp-Source: AMsMyM7QQTc+8PUrVJlllv2svQ8o04UCjYrw1llm3OecUayOtHxLeIAkMKk1hSvrW3fKtCeutu+v X-Received: by 2002:a05:6a00:1747:b0:56c:d93a:ac3e with SMTP id j7-20020a056a00174700b0056cd93aac3emr54313337pfc.23.1667888308766; Mon, 07 Nov 2022 22:18:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667888308; cv=none; d=google.com; s=arc-20160816; b=c5UdGa5uDjvhkxLgZUdya42zgwNstLXiveQJeRevyPHMhORY06VdpoGYI1W+tLQbGX bMuCfWwAP6Qbc2ehz2ExxNSOV2yAvthpMfKfsHhDssoG3B7bpJhE4d9FITvizaBI0TiB 8gfEo3+dEbdSNP+R9flrIbWt/0EzAHYkXcqAvDORV7OSHo4H+6n1LVkMTHbfPal5Sgsu sy3HypP7dGWpz3fSS4ipJ8MW7pOpj/vGTKL8XZNv04TpZI+zYRnbebLrrOiedPe1ny6d 3WVXs5WkwIaoJsVLKrSJgrI0ZGekcEh2zyqqwjuguAzyLBYXwb8TQxOxQEXb3dXm57Dy pTuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=757yoDhLQoswhPSAxDBASMvHCABau1Li9dh0moZLC3E=; b=KYR2iVWmtTQb94LWtJf6NHAg8BVOkM+VIFc7Ohf6dorxeNHh6vNNQGQOav5fd8SF0W A7gKxprqBwBKNzD6nJiI3R+qseQptaKiWf1gWTWfhF/bw1H9Q1cW+tOQxbysIlQSpzG7 2JZ3E79YNUjYyyIrVmEq8MvBpZwK7XPBEZqMPYa9E/s0I40dD4GspPEtegz567sOBp/O q5CzX7dUBJRLipHmK9djpCj6c9BhUzahu7kGTm2ZCm3B0XwgO5gUqHZrly4AyWFUUlkr laV/2LAeZpkopHiGIwAXAv16qCKJYYL8AAUA8laxhmcHo4M2i9IBtUXhtC+dt0DRSl29 yDpg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mw18-20020a17090b4d1200b0020d5c5e1660si17221661pjb.190.2022.11.07.22.18.14; Mon, 07 Nov 2022 22:18:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233404AbiKHGGL (ORCPT + 99 others); Tue, 8 Nov 2022 01:06:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233220AbiKHGGJ (ORCPT ); Tue, 8 Nov 2022 01:06:09 -0500 X-Greylist: delayed 618 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 07 Nov 2022 22:06:06 PST Received: from gw.atmark-techno.com (gw.atmark-techno.com [13.115.124.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4A763F079 for ; Mon, 7 Nov 2022 22:06:06 -0800 (PST) Received: from gw.atmark-techno.com (localhost [127.0.0.1]) by gw.atmark-techno.com (Postfix) with ESMTP id A1E1760147 for ; Tue, 8 Nov 2022 14:56:06 +0900 (JST) Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by gw.atmark-techno.com (Postfix) with ESMTPS id 655AD6014A for ; Tue, 8 Nov 2022 14:56:04 +0900 (JST) Received: by mail-pf1-f198.google.com with SMTP id cw4-20020a056a00450400b00561ec04e77aso6721838pfb.12 for ; Mon, 07 Nov 2022 21:56:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=757yoDhLQoswhPSAxDBASMvHCABau1Li9dh0moZLC3E=; b=XeIO8P2SQI7yjNrdC9eBUpQ2O8zzTOJL0WiQt30jNwyFu3AmVOoUbR2ajtKUXV6dFB 6f43h4x5TIDVLPT0wxozOFspS0poAgUS9Hd8DckUns+FtUXI+T+fe1ZMtuXukvPL4rxq XxVbq9NmRaSgz4JbCvvV3NOGbyQ4pqnmycTgXXpjYCcTQ3/WCCX/e8qWHeprxxy9aXZ5 RDwTmklpQASbCNQ2tcj9W7pOuCzDorJnsixApeIjrjt+wVR5ZtSWjp6+xVnxQuu0BEs2 CQcmZSLDICTX+0G+sI+TV/cnYGxigKt3EBZ4WAHG5fi4wIOc6McHT8DXuUcWgV8PBogW 4uhg== X-Gm-Message-State: ACrzQf24Sk5MOcNWpi5Aa3jNHEU0H7OthQpGv4qET3rpUboB9gtqhHeb ijmTmITTH0qmYnkVWs/9g+X9uaUk4Axrxm8Hx5Sp9zs4DN01fDlWbLCSnj78ki107Am01LiOgN8 kRdjSq1MFaHAbQWt4BYdYRWzQ0bz0 X-Received: by 2002:a17:90a:974b:b0:213:9bec:ae4e with SMTP id i11-20020a17090a974b00b002139becae4emr54696310pjw.200.1667886963450; Mon, 07 Nov 2022 21:56:03 -0800 (PST) X-Received: by 2002:a17:90a:974b:b0:213:9bec:ae4e with SMTP id i11-20020a17090a974b00b002139becae4emr54696286pjw.200.1667886963226; Mon, 07 Nov 2022 21:56:03 -0800 (PST) Received: from pc-zest.atmarktech (178.101.200.35.bc.googleusercontent.com. [35.200.101.178]) by smtp.gmail.com with ESMTPSA id f14-20020a170902ce8e00b00180033438a0sm5978640plg.106.2022.11.07.21.56.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Nov 2022 21:56:02 -0800 (PST) Received: from martinet by pc-zest.atmarktech with local (Exim 4.96) (envelope-from ) id 1osHab-0098L1-2q; Tue, 08 Nov 2022 14:56:01 +0900 From: Dominique Martinet To: Marcel Holtmann , Rob Herring , Krzysztof Kozlowski , Luiz Augusto von Dentz , Johan Hedberg Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-bluetooth@vger.kernel.org, Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S . Miller" , mizo@atmark-techno.com, Dominique Martinet Subject: [RFC PATCH 2/2] bluetooth/hci_h4: add serdev support Date: Tue, 8 Nov 2022 14:55:31 +0900 Message-Id: <20221108055531.2176793-3-dominique.martinet@atmark-techno.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221108055531.2176793-1-dominique.martinet@atmark-techno.com> References: <20221108055531.2176793-1-dominique.martinet@atmark-techno.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748907651579739724?= X-GMAIL-MSGID: =?utf-8?q?1748907651579739724?= adding serdev support to hci_h4 allows users to define h4 bluetooth controllers in dts files This allows users of bluetooth modules with an uart h4 interface to use dt bindings instead of manually running btattach Signed-off-by: Dominique Martinet --- drivers/bluetooth/Kconfig | 1 + drivers/bluetooth/hci_h4.c | 65 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig index e30707405455..69edc76a8611 100644 --- a/drivers/bluetooth/Kconfig +++ b/drivers/bluetooth/Kconfig @@ -113,6 +113,7 @@ config BT_HCIUART_SERDEV config BT_HCIUART_H4 bool "UART (H4) protocol support" depends on BT_HCIUART + depends on BT_HCIUART_SERDEV help UART (H4) is serial protocol for communication between Bluetooth device and host. This protocol is required for most Bluetooth devices diff --git a/drivers/bluetooth/hci_h4.c b/drivers/bluetooth/hci_h4.c index 1d0cdf023243..b214c8a4d450 100644 --- a/drivers/bluetooth/hci_h4.c +++ b/drivers/bluetooth/hci_h4.c @@ -18,6 +18,8 @@ #include #include +#include +#include #include #include #include @@ -32,6 +34,10 @@ #include "hci_uart.h" +struct h4_device { + struct hci_uart hu; +}; + struct h4_struct { struct sk_buff *rx_skb; struct sk_buff_head txq; @@ -130,6 +136,63 @@ static struct sk_buff *h4_dequeue(struct hci_uart *hu) return skb_dequeue(&h4->txq); } +static const struct hci_uart_proto h4p; + +static int h4_probe(struct serdev_device *serdev) +{ + struct h4_device *h4dev; + struct hci_uart *hu; + int ret; + u32 speed; + + h4dev = devm_kzalloc(&serdev->dev, sizeof(*h4dev), GFP_KERNEL); + if (!h4dev) + return -ENOMEM; + + hu = &h4dev->hu; + + hu->serdev = serdev; + ret = device_property_read_u32(&serdev->dev, "max-speed", &speed); + if (!ret) { + /* h4 does not have any baudrate handling: + * user oper speed from the start + */ + hu->init_speed = speed; + hu->oper_speed = speed; + } + + serdev_device_set_drvdata(serdev, h4dev); + dev_info(&serdev->dev, "h4 device registered.\n"); + + return hci_uart_register_device(hu, &h4p); +} + +static void h4_remove(struct serdev_device *serdev) +{ + struct h4_device *h4dev = serdev_device_get_drvdata(serdev); + + dev_info(&serdev->dev, "h4 device unregistered.\n"); + + hci_uart_unregister_device(&h4dev->hu); +} + +#ifdef CONFIG_OF +static const struct of_device_id h4_bluetooth_of_match[] = { + { .compatible = "nxp,aw-xm458-bt" }, + { }, +}; +MODULE_DEVICE_TABLE(of, h4_bluetooth_of_match); +#endif + +static struct serdev_device_driver h4_serdev_driver = { + .probe = h4_probe, + .remove = h4_remove, + .driver = { + .name = "hci_uart_h4", + .of_match_table = of_match_ptr(h4_bluetooth_of_match), + }, +}; + static const struct hci_uart_proto h4p = { .id = HCI_UART_H4, .name = "H4", @@ -143,11 +206,13 @@ static const struct hci_uart_proto h4p = { int __init h4_init(void) { + serdev_device_driver_register(&h4_serdev_driver); return hci_uart_register_proto(&h4p); } int __exit h4_deinit(void) { + serdev_device_driver_unregister(&h4_serdev_driver); return hci_uart_unregister_proto(&h4p); }