Re: [RFC 0/7] Nokia N9xx bluetooth driver

From: Marcel Holtmann
Date: Tue Aug 16 2016 - 03:11:02 EST


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