All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Sebastian Reichel <sre@kernel.org>
Cc: "Tony Lindgren" <tony@atomide.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"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, linux-kernel@vger.kernel.org
Subject: Re: [RFC 0/7] Nokia N9xx bluetooth driver
Date: Tue, 16 Aug 2016 09:10:54 +0200	[thread overview]
Message-ID: <A9EA833E-DDDE-46FB-917C-30CF00A70A6C@holtmann.org> (raw)
In-Reply-To: <1471058078-5579-1-git-send-email-sre@kernel.org>

Hi Sebastian,

> This series (based von 4.8-rc1) adds support for bluetooth on the Nokia
> N9xx devices. It has been tested on the Nokia N950, where it works
> correctly. On Nokia N900 it currently fails during negotiation
> (probably related to slightly incorrect serial settings/timings).
> The N900's bcm2048 correctly answeres to alive check even before
> negotiation (on N950 it does not work before negotiation), but replies
> with an Hardware error event to the negotiation packet.
> 
> Apart from N900 support there are still two "features" missing in the
> driver:
> 
> 1. To save energy the bluetooth module can be put into sleep mode via a
>   GPIO. This gpio should be enabled before sending data via UART and
>   disabled once the transmission is done. I currently just keep the
>   GPIO always enabled.
> 2. It would be nice to have a bluetooth device exposed by the kernel
>   automatically without having to setup the tty disector first for
>   proper configurationless out of the box support. I could not find
>   a nice way to do this from the kernel, though.

currently using the HCI line discipline is the only way to attach a Bluetooth device to a serial line / UART.

However I have been advocating for a serial bus or UART bus for a long time now. It is needed especially for Bluetooth devices which have no business in being exposed as TTYs in the first place.

This is true for the ACPI and DT world actually. Some UARTs should not be exposed as TTY and just be stuck on a bus that can be enumerated and matched by a driver that knows how to handle it.

This goes along with the weird fetish to expose certain Bluetooth GPIOs as RFKILL switches. They are not that either since they just power the UART. They have nothing to do with a radio RFKILL switch. We fixed the Intel and Broadcom ones to be mapped into the driver. Having a proper bus would make this one also a lot easier.

Regards

Marcel

WARNING: multiple messages have this Message-ID (diff)
From: Marcel Holtmann <marcel-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
To: Sebastian Reichel <sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: "Tony Lindgren" <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
	"Rob Herring" <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	"Mark Rutland" <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	"Greg Kroah-Hartman"
	<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
	"Jiri Slaby" <jslaby-IBi9RG/b67k@public.gmane.org>,
	"Ville Tervo" <ville.tervo-X3B1VOXEql0@public.gmane.org>,
	"Filip Matijević"
	<filip.matijevic.pz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Aaro Koskinen" <aaro.koskinen-X3B1VOXEql0@public.gmane.org>,
	"Pavel Machek" <pavel-+ZI9xUNit7I@public.gmane.org>,
	"Pali Rohár" <pali.rohar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	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,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [RFC 0/7] Nokia N9xx bluetooth driver
Date: Tue, 16 Aug 2016 09:10:54 +0200	[thread overview]
Message-ID: <A9EA833E-DDDE-46FB-917C-30CF00A70A6C@holtmann.org> (raw)
In-Reply-To: <1471058078-5579-1-git-send-email-sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

Hi Sebastian,

> This series (based von 4.8-rc1) adds support for bluetooth on the Nokia
> N9xx devices. It has been tested on the Nokia N950, where it works
> correctly. On Nokia N900 it currently fails during negotiation
> (probably related to slightly incorrect serial settings/timings).
> The N900's bcm2048 correctly answeres to alive check even before
> negotiation (on N950 it does not work before negotiation), but replies
> with an Hardware error event to the negotiation packet.
> 
> Apart from N900 support there are still two "features" missing in the
> driver:
> 
> 1. To save energy the bluetooth module can be put into sleep mode via a
>   GPIO. This gpio should be enabled before sending data via UART and
>   disabled once the transmission is done. I currently just keep the
>   GPIO always enabled.
> 2. It would be nice to have a bluetooth device exposed by the kernel
>   automatically without having to setup the tty disector first for
>   proper configurationless out of the box support. I could not find
>   a nice way to do this from the kernel, though.

currently using the HCI line discipline is the only way to attach a Bluetooth device to a serial line / UART.

However I have been advocating for a serial bus or UART bus for a long time now. It is needed especially for Bluetooth devices which have no business in being exposed as TTYs in the first place.

This is true for the ACPI and DT world actually. Some UARTs should not be exposed as TTY and just be stuck on a bus that can be enumerated and matched by a driver that knows how to handle it.

This goes along with the weird fetish to expose certain Bluetooth GPIOs as RFKILL switches. They are not that either since they just power the UART. They have nothing to do with a radio RFKILL switch. We fixed the Intel and Broadcom ones to be mapped into the driver. Having a proper bus would make this one also a lot easier.

Regards

Marcel

--
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

  parent reply	other threads:[~2016-08-16  7:11 UTC|newest]

Thread overview: 52+ 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-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-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 13:11         ` Rob Herring
2016-08-17 15:54         ` Pavel Machek
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-14  8:51     ` Pavel Machek
2016-08-16  7:05   ` Marcel Holtmann
2016-08-16  7:51     ` Sebastian Reichel
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
2016-08-14 23:54     ` Paul Gortmaker
2016-08-15  1:12     ` Sebastian Reichel
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  9:09       ` Sebastian Reichel
2016-08-16 10:23       ` Marcel Holtmann
2016-08-16 10:23         ` Marcel Holtmann
2016-08-16 20:05         ` Pavel Machek
2016-08-16 10:23       ` Marcel Holtmann
2016-08-16 10:23         ` Marcel Holtmann
2016-08-16  8:10   ` 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-13  3:14   ` Sebastian Reichel
2016-08-14  8:53   ` Pavel Machek
2016-08-16  7:10 ` Marcel Holtmann [this message]
2016-08-16  7:10   ` [RFC 0/7] Nokia N9xx bluetooth driver Marcel Holtmann
2016-08-16 20:22   ` Rob Herring
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=A9EA833E-DDDE-46FB-917C-30CF00A70A6C@holtmann.org \
    --to=marcel@holtmann.org \
    --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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.