From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752428AbcHNXzE (ORCPT ); Sun, 14 Aug 2016 19:55:04 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36346 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751810AbcHNXzB (ORCPT ); Sun, 14 Aug 2016 19:55:01 -0400 MIME-Version: 1.0 In-Reply-To: <1471058078-5579-6-git-send-email-sre@kernel.org> References: <1471058078-5579-1-git-send-email-sre@kernel.org> <1471058078-5579-6-git-send-email-sre@kernel.org> From: Paul Gortmaker Date: Sun, 14 Aug 2016 19:54:28 -0400 X-Google-Sender-Auth: mHGiTZ5Ryvq8kC7KxeeMBrIwGM8 Message-ID: Subject: Re: [RFC 5/7] Bluetooth: hci_nokia: Introduce new driver To: Sebastian Reichel Cc: Tony Lindgren , Rob Herring , Mark Rutland , Marcel Holtmann , Greg Kroah-Hartman , Jiri Slaby , Ville Tervo , =?UTF-8?Q?Filip_Matijevi=C4=87?= , Aaro Koskinen , Pavel Machek , =?UTF-8?Q?Pali_Roh=C3=A1r?= , ivo.g.dimitrov.75@gmail.com, linux-bluetooth@vger.kernel.org, linux-serial@vger.kernel.org, linux-omap@vger.kernel.org, devicetree@vger.kernel.org, LKML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 12, 2016 at 11:14 PM, Sebastian Reichel wrote: > This driver adds support for Nokia H4+ procotol used > for example by Nokia's internet tablets (N770 - N950). > --- > drivers/bluetooth/Kconfig | 10 + > drivers/bluetooth/Makefile | 1 + > drivers/bluetooth/hci_ldisc.c | 6 + > drivers/bluetooth/hci_nokia.c | 734 ++++++++++++++++++++++++++++++++++++++++++ > drivers/bluetooth/hci_nokia.h | 140 ++++++++ > drivers/bluetooth/hci_uart.h | 8 +- > 6 files changed, 898 insertions(+), 1 deletion(-) > create mode 100644 drivers/bluetooth/hci_nokia.c > create mode 100644 drivers/bluetooth/hci_nokia.h > > diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig > index cf50fd2e96df..c32d9d5ad1d2 100644 > --- a/drivers/bluetooth/Kconfig > +++ b/drivers/bluetooth/Kconfig > @@ -86,6 +86,16 @@ config BT_HCIUART_H4 > > Say Y here to compile support for HCI UART (H4) protocol. > > +config BT_HCIUART_NOKIA > + bool "UART Nokia H4+ protocol support" If the option is a bool, then you don't need module.h or any MODULE macros, nor do you need any __exit or unregister related code. Alternatively, if there is a use case for it to be modular, then maybe you want to change the above to a tristate. Paul. -- > + depends on BT_HCIUART > + help > + Nokia H4+ is serial protocol for communication between Bluetooth > + device and host. This protocol is required for Bluetooth devices > + with UART interface in Nokia devices. > + > + Say Y here to compile support for Nokia's H4+ protocol. > + > config BT_HCIUART_BCSP > bool "BCSP protocol support" > depends on BT_HCIUART [...] > + { .compatible = "nokia,ti,wl1271-bluetooth", }, > + {}, > +}; > +MODULE_DEVICE_TABLE(of, nokia_bluetooth_of_match); > + > +static struct platform_driver platform_nokia_driver = { > + .driver = { > + .name = "nokia-bluetooth", > + .of_match_table = nokia_bluetooth_of_match, > + }, > + .probe = nokia_bluetooth_probe, > +}; > + > +int __init nokia_init(void) > +{ > + platform_driver_register(&platform_nokia_driver); > + return hci_uart_register_proto(&nokia_proto); > +} > + > +int __exit nokia_deinit(void) > +{ > + platform_driver_unregister(&platform_nokia_driver); > + return hci_uart_unregister_proto(&nokia_proto); > +} From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Gortmaker Subject: Re: [RFC 5/7] Bluetooth: hci_nokia: Introduce new driver Date: Sun, 14 Aug 2016 19:54:28 -0400 Message-ID: References: <1471058078-5579-1-git-send-email-sre@kernel.org> <1471058078-5579-6-git-send-email-sre@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <1471058078-5579-6-git-send-email-sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Sebastian Reichel Cc: Tony Lindgren , Rob Herring , Mark Rutland , Marcel Holtmann , Greg Kroah-Hartman , Jiri Slaby , Ville Tervo , =?UTF-8?Q?Filip_Matijevi=C4=87?= , Aaro Koskinen , Pavel Machek , =?UTF-8?Q?Pali_Roh=C3=A1r?= , ivo.g.dimitrov.75-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, LKML List-Id: devicetree@vger.kernel.org On Fri, Aug 12, 2016 at 11:14 PM, Sebastian Reichel wrote: > This driver adds support for Nokia H4+ procotol used > for example by Nokia's internet tablets (N770 - N950). > --- > drivers/bluetooth/Kconfig | 10 + > drivers/bluetooth/Makefile | 1 + > drivers/bluetooth/hci_ldisc.c | 6 + > drivers/bluetooth/hci_nokia.c | 734 ++++++++++++++++++++++++++++++++++++++++++ > drivers/bluetooth/hci_nokia.h | 140 ++++++++ > drivers/bluetooth/hci_uart.h | 8 +- > 6 files changed, 898 insertions(+), 1 deletion(-) > create mode 100644 drivers/bluetooth/hci_nokia.c > create mode 100644 drivers/bluetooth/hci_nokia.h > > diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig > index cf50fd2e96df..c32d9d5ad1d2 100644 > --- a/drivers/bluetooth/Kconfig > +++ b/drivers/bluetooth/Kconfig > @@ -86,6 +86,16 @@ config BT_HCIUART_H4 > > Say Y here to compile support for HCI UART (H4) protocol. > > +config BT_HCIUART_NOKIA > + bool "UART Nokia H4+ protocol support" If the option is a bool, then you don't need module.h or any MODULE macros, nor do you need any __exit or unregister related code. Alternatively, if there is a use case for it to be modular, then maybe you want to change the above to a tristate. Paul. -- > + depends on BT_HCIUART > + help > + Nokia H4+ is serial protocol for communication between Bluetooth > + device and host. This protocol is required for Bluetooth devices > + with UART interface in Nokia devices. > + > + Say Y here to compile support for Nokia's H4+ protocol. > + > config BT_HCIUART_BCSP > bool "BCSP protocol support" > depends on BT_HCIUART [...] > + { .compatible = "nokia,ti,wl1271-bluetooth", }, > + {}, > +}; > +MODULE_DEVICE_TABLE(of, nokia_bluetooth_of_match); > + > +static struct platform_driver platform_nokia_driver = { > + .driver = { > + .name = "nokia-bluetooth", > + .of_match_table = nokia_bluetooth_of_match, > + }, > + .probe = nokia_bluetooth_probe, > +}; > + > +int __init nokia_init(void) > +{ > + platform_driver_register(&platform_nokia_driver); > + return hci_uart_register_proto(&nokia_proto); > +} > + > +int __exit nokia_deinit(void) > +{ > + platform_driver_unregister(&platform_nokia_driver); > + return hci_uart_unregister_proto(&nokia_proto); > +} -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html