linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: Sebastian Reichel <sre@kernel.org>
Cc: "Tony Lindgren" <tony@atomide.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Marcel Holtmann" <marcel@holtmann.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Jiri Slaby" <jslaby@suse.com>,
	"Ville Tervo" <ville.tervo@iki.fi>,
	"Filip Matijević" <filip.matijevic.pz@gmail.com>,
	"Aaro Koskinen" <aaro.koskinen@iki.fi>,
	"Pavel Machek" <pavel@ucw.cz>,
	"Pali Rohár" <pali.rohar@gmail.com>,
	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 <linux-kernel@vger.kernel.org>
Subject: Re: [RFC 5/7] Bluetooth: hci_nokia: Introduce new driver
Date: Sun, 14 Aug 2016 19:54:28 -0400	[thread overview]
Message-ID: <CAP=VYLo4ptVzhPjKoiiakbCgBSmpQndNzf0LHWxCZs7LiZ7PYw@mail.gmail.com> (raw)
In-Reply-To: <1471058078-5579-6-git-send-email-sre@kernel.org>

On Fri, Aug 12, 2016 at 11:14 PM, Sebastian Reichel <sre@kernel.org> 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);
> +}

  reply	other threads:[~2016-08-14 23:55 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-13  3:14 [RFC 0/7] Nokia N9xx bluetooth driver Sebastian Reichel
2016-08-13  3:14 ` [RFC 1/7] tty: serial: omap: add UPF_BOOT_AUTOCONF flag for DT init Sebastian Reichel
2016-08-14  8:49   ` Pavel Machek
2016-08-16  8:14     ` Sebastian Reichel
2016-08-13  3:14 ` [RFC 2/7] tty: add support for "tty slave" devices Sebastian Reichel
2016-08-13 10:03   ` Greg Kroah-Hartman
2016-08-13 20:31     ` Sebastian Reichel
2016-08-14 11:36       ` Greg Kroah-Hartman
2016-08-14  8:48     ` Pavel Machek
2016-08-14 11:35       ` Greg Kroah-Hartman
2016-08-13  3:14 ` [RFC 3/7] dt: bindings: Add nokia-bluetooth Sebastian Reichel
2016-08-16 13:51   ` Rob Herring
2016-08-16 23:28     ` Sebastian Reichel
2016-08-17 13:11       ` Rob Herring
2016-08-17 15:54         ` Pavel Machek
2016-08-13  3:14 ` [RFC 4/7] Bluetooth: hci_uart: Add support for word alignment Sebastian Reichel
2016-08-14  8:51   ` Pavel Machek
2016-08-16  7:05   ` Marcel Holtmann
2016-08-16  7:51     ` Sebastian Reichel
2016-08-13  3:14 ` [RFC 5/7] Bluetooth: hci_nokia: Introduce new driver Sebastian Reichel
2016-08-14 23:54   ` Paul Gortmaker [this message]
2016-08-15  1:12     ` Sebastian Reichel
2016-08-16  7:02   ` Marcel Holtmann
2016-08-16  7:52     ` Pali Rohár
2016-08-16  9:25       ` Sebastian Reichel
2016-08-16  9:09     ` Sebastian Reichel
2016-08-16 10:23       ` Marcel Holtmann
2016-08-16 20:05         ` Pavel Machek
2016-08-16 10:23       ` Marcel Holtmann
2016-08-16  8:10   ` Marcel Holtmann
2016-08-16  9:35     ` Sebastian Reichel
2016-08-13  3:14 ` [RFC 6/7] ARM: dts: OMAP3-N900: Add bluetooth Sebastian Reichel
2016-08-14  8:53   ` Pavel Machek
2016-08-13  3:14 ` [RFC 7/7] ARM: dts: OMAP3-N950: " Sebastian Reichel
2016-08-14  8:53   ` Pavel Machek
2016-08-16  7:10 ` [RFC 0/7] Nokia N9xx bluetooth driver Marcel Holtmann
2016-08-16 20:22   ` Rob Herring

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='CAP=VYLo4ptVzhPjKoiiakbCgBSmpQndNzf0LHWxCZs7LiZ7PYw@mail.gmail.com' \
    --to=paul.gortmaker@windriver.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=devicetree@vger.kernel.org \
    --cc=filip.matijevic.pz@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ivo.g.dimitrov.75@gmail.com \
    --cc=jslaby@suse.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=mark.rutland@arm.com \
    --cc=pali.rohar@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@kernel.org \
    --cc=sre@kernel.org \
    --cc=tony@atomide.com \
    --cc=ville.tervo@iki.fi \
    /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;
as well as URLs for NNTP newsgroup(s).