20 Sep, 2016
1 commit
-
wait_on_bit_timeout() returns one of the following three values:
* 0 to indicate success.
* -EINTR to indicate that a signal has been received;
* -EAGAIN to indicate timeout;
Make the wait_on_bit_timeout() callers check for these values.Signed-off-by: Bart Van Assche
Signed-off-by: Johan Hedberg
Signed-off-by: Marcel Holtmann
12 Jul, 2016
1 commit
-
LPM can be enabled via a DDC write command at specific DDC ID.
As any other DDC value, this is up to the DDC config file to
include (or not) the low power mode configuration.Signed-off-by: Loic Poulain
Signed-off-by: Marcel Holtmann
03 May, 2016
1 commit
-
gpiod_get_optional can return either ERR_PTR or NULL pointer.
NULL case is not tested and then dereferenced later in desc_to_gpio.
Fix this by using non optional version which returns ERR_PTR in any
error case (this is not an optional gpio).
Use the same non optional version for the host-wake gpio.Fixes: 765ea3abd116 ("Bluetooth: hci_intel: Retrieve host-wake IRQ")
Signed-off-by: Loic Poulain
Signed-off-by: Marcel Holtmann
24 Feb, 2016
1 commit
-
A return value of the intel_wait_booting() function compared with
a constant ETIMEDOUT instead of -ETIMEDOUT.Signed-off-by: Anton Protopopov
Signed-off-by: Marcel Holtmann
10 Dec, 2015
2 commits
-
The Intel Version Read command is used to retrieve information
about hardware and firmware version/revision of Intel Bluetooth
controllers. This is an Intel generic command used in USB and
UART drivers.Signed-off-by: Loic Poulain
Signed-off-by: Marcel Holtmann -
Use the standard HCI_CMD_TIMEOUT(1s) for HCI command instead of
HCI_INIT_TIMEOUT(10s) which is not justified in these cases.Signed-off-by: Loic Poulain
Signed-off-by: Marcel Holtmann
20 Nov, 2015
1 commit
-
The new hci_skb_pkt_* wrappers are mainly intented for drivers to
require less knowledge about bt_cb(sbk) handling. So after converting
the core packet handling, convert all drivers.Signed-off-by: Marcel Holtmann
Signed-off-by: Johan Hedberg
21 Oct, 2015
2 commits
-
Provide an early indication about the manufacturer information so that
it can be forwarded into monitor channel.Signed-off-by: Marcel Holtmann
Signed-off-by: Johan Hedberg -
For Intel controllers with firmware that allows tracing of baseband
functionality this allows enabling it via set_diag driver callback.Signed-off-by: Marcel Holtmann
Signed-off-by: Johan Hedberg
01 Oct, 2015
1 commit
-
There is some unneeded code in "hci_intel" probing. First
acpi_match_device() call is needless as driver/platform/acpi core code has
already done the matching before calling the probe and the driver does not
use the returned pointer to matching _HID other than checking is it NULL.Then tree wide grep for "hci_intel" doesn't reveal that there is any code
registering this platform device so it looks this device is always backed
with ACPI companion so also ACPI_HANDLE() test can be removed.Signed-off-by: Jarkko Nikula
Signed-off-by: Marcel Holtmann
17 Sep, 2015
12 commits
-
We need to explicitly enable the IRQ wakeup mode to let the controller
wake the system from sleep states (like suspend-to-ram).
PM suspend/resume callbacks now call the generic intel device PM
functions after enabling/disabling IRQ wake.Signed-off-by: Loic Poulain
Signed-off-by: Marcel Holtmann -
Change the way to insert LPM packets into the txq.
Use skb_queue_head instead of skb_queue_tail to always prioritise LPM
packets over potential tx queue content.Signed-off-by: Loic Poulain
Signed-off-by: Marcel Holtmann -
Apply DDC parameters once controller is in operational mode.
Signed-off-by: Loic Poulain
Signed-off-by: Marcel Holtmann -
intel_lpm_suspend/resume are only used in case of CONFIG_PM.
Signed-off-by: Loic Poulain
Signed-off-by: Marcel Holtmann -
Don't hide this packet size error.
Signed-off-by: Loic Poulain
Signed-off-by: Marcel Holtmann -
Implement runtime PM suspend/resume callbacks.
If LPM supported, controller is put into supsend after a delay of
inactivity (1s). Inactivity is based on LPM idle notification and
host TX traffic.Signed-off-by: Loic Poulain
Signed-off-by: Marcel Holtmann -
Add PM suspend/resume callbacks which call lpm_suspend/resume.
Add LPM ack in threaded IRQ handler to notify the controller that
resume is complete.
Protect hci_uart against concurrent removing during suspend/resume.Signed-off-by: Loic Poulain
Signed-off-by: Marcel Holtmann -
Add LPM PM suspend/resume/host_wake LPM functions.
A LPM transaction is composed with a LPM request and ack/response.
Host can send a LPM suspend/resume request to the controller which
should respond with a LPM ack.
If resume is requested by the controller (irq), host has to send a LPM
ack once resumed.Signed-off-by: Loic Poulain
Signed-off-by: Marcel Holtmann -
Replace the device_intel list spinlock with a mutex.
devm_request_threaded_irq is not atomic and upcomming PM support should
be simpler.Signed-off-by: Loic Poulain
Signed-off-by: Marcel Holtmann -
Replace BT_ logging calls by the new bt_dev ones.
Signed-off-by: Loic Poulain
Signed-off-by: Marcel Holtmann -
Enable controller Low-Power-Mode if we have a pdev to manage host
wake-up. Once LPM is enabled, controller notifies its TX status via
a vendor specific packet (tx_idle/tx_active).
tx_active means that there is more data upcoming from controller.
tx_idle means that controller can be put in suspended state.Signed-off-by: Loic Poulain
Signed-off-by: Marcel Holtmann -
An IRQ can be retrieved from the pdev resources. This irq will be used
in case of LPM suspend mode to wake-up the host and resume the link.
This resource can be declared as a GPIO-Interrupt which requires to be
converted into IRQ.Signed-off-by: Loic Poulain
Signed-off-by: Marcel Holtmann
29 Aug, 2015
2 commits
-
A platform device can be used to provide some specific resources in
order to manage the controller. In this first patch we retrieve the
reset gpio which is used to power on/off the controller.The main issue is to match the current tty with the correct pdev.
In case of ACPI, we can easily find the right tty/pdev pair because
they are both child of the same UART port.If controller is powered-on from the driver, we need to wait for a
HCI boot event before being able to send any command.Signed-off-by: Loic Poulain
Signed-off-by: Marcel Holtmann -
Implement the set_baudrate callback for hci_intel.
- Controller requires a read Intel version command before updating
its baudrate.
- The operation consists in an async cmd since the controller does
not respond at the same speed.
- Wait 100ms to let the controller change its baudrate.
- Clear RTS until we change our own UART speedManage speed change in the setup function, we need to restore the oper
speed once chip has booted on patched firmware.Signed-off-by: Loic Poulain
Signed-off-by: Marcel Holtmann
23 Jul, 2015
4 commits
-
The Intel version information is shared between USB and UART drivers
and with that move it into a generic function of the Intel module.Signed-off-by: Marcel Holtmann
Signed-off-by: Johan Hedberg -
The Intel Secure Send command is used the same in USB and UART drivers
and with that move a generic version into the Intel module.Signed-off-by: Marcel Holtmann
Signed-off-by: Johan Hedberg -
The Intel specific Bluetooth module provides support for pubic address
configuration. So make sure that it is enabled for Intel UART devices.Signed-off-by: Marcel Holtmann
Signed-off-by: Johan Hedberg -
The Intel Lightning Peak devices do not come with Bluetooth firmware
loaded and thus require a full download of the operational Bluetooth
firmware when the device is attached via the Bluetooth line discipline.Lightning Peak devices start with a bootloader mode that only accepts
a very limited set of HCI commands. The supported commands are enough
to identify the hardware and select the right firmware to load.Signed-off-by: Loic Poulain
Signed-off-by: Marcel Holtmann
08 Apr, 2015
2 commits
-
The Bluetooth address setting for Intel devices is provided by a generic
module now. Start using that module instead of relying it being included
in the driver.Signed-off-by: Marcel Holtmann
Signed-off-by: Johan Hedberg -
When using vendor detection, this adds support for the Intel specific
address configuration command.Signed-off-by: Marcel Holtmann
Signed-off-by: Johan Hedberg