summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/btbcm.c
Commit message (Collapse)AuthorAgeFilesLines
* Bluetooth: btbcm: Add BCM4330B1 UART deviceFrederic Danis2015-07-301-1/+7
| | | | | | | | Add "waiting for configuration" address. Add lmp_subver and firmware name for BCM4330B1 controller. Signed-off-by: Frederic Danis <frederic.danis@linux.intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* Bluetooth: btbcm: allow btbcm_read_verbose_config to fail on AppleChris Mason2015-07-141-6/+5Star
| | | | | | | | | | | | | | | | Commit 1c8ba6d013 moved around the setup code for broadcomm chips, and also added btbcm_read_verbose_config() to read extra information about the hardware. It's returning errors on some macbooks: Bluetooth: hci0: BCM: Read verbose config info failed (-16) Which makes us error out of the setup function. Since this probe isn't critical to operate the chip, this patch just changes things to carry on when it fails. Signed-off-by: Chris Mason <clm@fb.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Cc: stable@vger.kernel.org # v4.1
* Bluetooth: btbcm: Support the BCM4354 Bluetooth UART deviceIlya Faenson2015-06-171-0/+2
| | | | | | | | Support the BCM4354 chip and introduce vendor specific command parameter definitions. Signed-off-by: Ilya Faenson <ifaenson@broadcom.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* Bluetooth: btbcm: Add helper functions for UART setupFrederic Danis2015-06-061-0/+89
| | | | | | | | | | | | | | | | | | | | Firmware loading may reset the controller UART speed and needs to set host UART speed back to init speed. UART drivers setup is split in 3 parts: - btbcm_initialize() resets the controller and returns the firmware name based on controller revision and sub_version. - btbtcm_patchram() (already existing and public), which takes the firmware name as parameter, requests the firmware and loads it to the controller. - btbcm_finalize() which resets the controller, reads local version and checks if the controller address is a default one or not. Remove firmware name retrieval for UART controllers from btbcm_setup_patchram(). Signed-off-by: Frederic Danis <frederic.danis@linux.intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* Bluetooth: btbcm: Add BCM4324B3 UART deviceFrederic Danis2015-06-061-2/+13
| | | | | | | | Add "waiting for configuration" address. Add lmp_subver and firmware name for BCM4324B3 controller. Signed-off-by: Frederic Danis <frederic.danis@linux.intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* Bluetooth: btbcm: Move request/release_firmware()Frederic Danis2015-06-061-14/+12Star
| | | | | | | | | | | | Move request/release_firmware() out of btbcm_patchram(). This allows a better error management, if request_firmware() returns an error then the controller will be used without firmware loading and 0 is returned. This will imply to change btbcm_patchram() to accept a firmware instead of firmware name. Signed-off-by: Frederic Danis <frederic.danis@linux.intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* Bluetooth: btbcm: Fix calls to __hci_cmd_sync()Frederic Danis2015-05-151-6/+0Star
| | | | | | | | | | | | | | | | | | | Remove test of command reply status as it is already performed by __hci_cmd_sync(). __hci_cmd_sync_ev() function already returns an error if it got a non-zero status either through a Command Complete or a Command Status event. For both of these events the status is collected up in the event handlers called by hci_event_packet() and then passed as the second parameter to req_complete_skb(). The req_complete_skb() callback in turn is hci_req_sync_complete() for __hci_cmd_sync_ev() which stores the status in hdev->req_result. The hdev->req_result is then further converted through bt_to_errno() back in __hci_cmd_sync_ev(). Signed-off-by: Frederic Danis <frederic.danis@linux.intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* Bluetooth: btbcm: Export patchram download as separate functionMarcel Holtmann2015-04-301-69/+79
| | | | | | | | This isolates the Broadcom patchram download procedure as separate function so that it can be easily used from USB and UART based drivers. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
* Bluetooth: btbcm: Add firmware table for UART based devicesMarcel Holtmann2015-04-071-15/+41
| | | | | | | | The Broadcom UART based devices seem to use a little bit different firmare naming prefix. So add a separate table for these devices. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
* Bluetooth: btusb: Move Broadcom quirk setting into support moduleMarcel Holtmann2015-04-071-0/+4
| | | | | | | | The quirks for Broadcom devices can be set from the setup function and to keep the code simple, just move them into Broadcom support module. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
* Bluetooth: btbcm: Add support for Broadcom controller setupMarcel Holtmann2015-04-071-0/+258
| | | | | | | | To unify the controller setup of Broadcom devices between USB and UART transport, add the patchram download support into the Broadcom module. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
* Bluetooth: btbcm: Introduce generic Broadcom Bluetooth supportMarcel Holtmann2015-04-071-0/+99
The majority of Broadcom Bluetooth vendor commands are shared between USB and UART transports. This creates a separate module that eventually will hold all Broadcom specific commands, but for now just start with the commands to change the Bluetooth public address and check for the default address. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>