1. 17 2月, 2017 13 次提交
    • J
      Bluetooth: btqcomsmd: Allow driver to build if COMPILE_TEST is enabled · e27ee2b1
      Javier Martinez Canillas 提交于
      The driver only has runtime but no build time dependency with QCOM_SMD &&
      QCOM_WCNSS_CTRL. So it can be built for testing purposes if COMPILE_TEST
      option is enabled.
      
      This is useful to have more build coverage and make sure that the driver
      is not affected by changes that could cause build regressions.
      Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      e27ee2b1
    • D
      Bluetooth: Add another AR3012 04ca:3018 device · 441ad62d
      Dmitry Tunin 提交于
      T:  Bus=01 Lev=01 Prnt=01 Port=07 Cnt=04 Dev#=  5 Spd=12  MxCh= 0
      D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=04ca ProdID=3018 Rev=00.01
      C:  #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
      I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      I:  If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      Signed-off-by: NDmitry Tunin <hanipouspilot@gmail.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Cc: stable@vger.kernel.org
      441ad62d
    • D
      Bluetooth: hci_bcm: Add support for BCM2E95 and BCM2E96 · 89ab37b4
      Daniel Drake 提交于
      The BCM2E96 ID is used by the ECS EF20 laptop, and BCM2E95 is present
      in the Weibu F3C. Both are now logged as:
      
           hci0: BCM: chip id 82
           hci0: BCM43341B0 (002.001.014) build 0000
           hci0: BCM (002.001.014) build 0158
      
      The ECS vendor kernel predates the host-wakeup support in hci_bcm but
      it explicitly has a comment saying that the GPIO assignment needs to be
      reordered for BCM2E96:
       1. (not used in vendor driver)
       2. Device wakeup
       3. Shutdown
      
      For both devices in question, the DSDT has these GPIOs listed in order
      of GpioInt, GpioIo, GpioIo. And if we use the first one listed (GpioInt)
      as the host wakeup, that interrupt handler fires while doing bluetooth
      I/O.
      
      I am assuming the convention of GPIO ordering has been changed for these
      new device IDs, so lets use the new ordering on such devices.
      Signed-off-by: NDaniel Drake <drake@endlessm.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      89ab37b4
    • W
      Bluetooth: btbcm: Add a delay for module reset · 3af3a594
      Wen-chien Jesse Sung 提交于
      Some btbcm devices require more time to complete its reset process.
      They won't reply any hci command until reset is done.
      
      [ 17.218554] Bluetooth: hci0 command 0x1001 tx timeout
      [ 25.214999] Bluetooth: hci0: BCM: Reading local version info failed (-110)
      Signed-off-by: NWen-chien Jesse Sung <jesse.sung@canonical.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      3af3a594
    • W
      Bluetooth: btusb: Add support for 413c:8143 · fdfddc60
      Wen-chien Jesse Sung 提交于
      This is a Boardcom module and requires patchram to work.
      
      T: Bus=01 Lev=03 Prnt=03 Port=01 Cnt=02 Dev#= 5 Spd=12 MxCh= 0
      D: Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
      P: Vendor=413c ProdID=8143 Rev= 1.12
      S: Manufacturer=Broadcom Corp
      S: Product=BCM20702A0
      S: SerialNumber=20689D1FAF94
      C:* #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr= 0mA
      I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
      E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms
      E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
      E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
      I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
      E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms
      E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms
      I: If#= 1 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
      E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms
      E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms
      I: If#= 1 Alt= 2 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
      E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms
      E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms
      I: If#= 1 Alt= 3 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
      E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms
      E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms
      I: If#= 1 Alt= 4 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
      E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms
      E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms
      I: If#= 1 Alt= 5 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
      E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms
      E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms
      I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
      E: Ad=84(I) Atr=02(Bulk) MxPS= 32 Ivl=0ms
      E: Ad=04(O) Atr=02(Bulk) MxPS= 32 Ivl=0ms
      I:* If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)
      Signed-off-by: NWen-chien Jesse Sung <jesse.sung@canonical.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      fdfddc60
    • J
      btmrvl: use dt's irqflags for wakeup pin · ffb955db
      Jeffy Chen 提交于
      Use irqflags parsed from dt.
      Signed-off-by: NJeffy Chen <jeffy.chen@rock-chips.com>
      Reviewed-by: NBrian Norris <briannorris@chromium.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      ffb955db
    • J
      btmrvl: set irq_bt to -1 when failed to parse it · fd1a88da
      Jeffy Chen 提交于
      The irq_of_parse_and_map will return 0 as a invalid irq.
      
      Set irq_bt to -1 in this case, so that the btmrvl resume/suspend code
      would not try to enable/disable it.
      Signed-off-by: NJeffy Chen <jeffy.chen@rock-chips.com>
      Reviewed-by: NBrian Norris <briannorris@chromium.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      fd1a88da
    • J
      btmrvl: avoid double-disable_irq() race · 9af02d86
      Jeffy Chen 提交于
      It's much the same as what we did for mwifiex in:
      b9da4d22 mwifiex: avoid double-disable_irq() race
      
      "We have a race where the wakeup IRQ might be in flight while we're
      calling mwifiex_disable_wake() from resume(). This can leave us
      disabling the IRQ twice.
      
      Let's disable the IRQ and enable it in case if we have double-disabled
      it."
      Signed-off-by: NJeffy Chen <jeffy.chen@rock-chips.com>
      Reviewed-by: NBrian Norris <briannorris@chromium.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      9af02d86
    • R
      Bluetooth: btusb: Configure Marvell to use one of the pins for oob wakeup · a4ccc9e3
      Rajat Jain 提交于
      The Marvell devices may have many gpio pins, and hence for wakeup
      on these out-of-band pins, the chip needs to be told which pin is
      to be used for wakeup, using an hci command.
      
      Thus, we read the pin number etc from the device tree node and send
      a command to the chip.
      Signed-off-by: NRajat Jain <rajatja@google.com>
      Reviewed-by: NBrian Norris <briannorris@chromium.org>
      Acked-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      a4ccc9e3
    • R
      Bluetooth: btusb: Add out-of-band wakeup support · fd913ef7
      Rajat Jain 提交于
      Some onboard BT chips (e.g. Marvell 8997) contain a wakeup pin that
      can be connected to a gpio on the CPU side, and can be used to wakeup
      the host out-of-band. This can be useful in situations where the
      in-band wakeup is not possible or not preferable (e.g. the in-band
      wakeup may require the USB host controller to remain active, and
      hence consuming more system power during system sleep).
      
      The oob gpio interrupt to be used for wakeup on the CPU side, is
      read from the device tree node, (using standard interrupt descriptors).
      A devcie tree binding document is also added for the driver. The
      compatible string is in compliance with
      Documentation/devicetree/bindings/usb/usb-device.txt
      Signed-off-by: NRajat Jain <rajatja@google.com>
      Reviewed-by: NBrian Norris <briannorris@chromium.org>
      Acked-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      fd913ef7
    • R
      Bluetooth: btusb: Use an error label for error paths · 10ab133b
      Rajat Jain 提交于
      Use a label to remove the repetetive cleanup, for error cases.
      Signed-off-by: NRajat Jain <rajatja@google.com>
      Reviewed-by: NBrian Norris <briannorris@chromium.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      10ab133b
    • J
      Bluetooth: btqcomsmd: Fix module autoload · 747d3f1a
      Javier Martinez Canillas 提交于
      If the driver is built as a module, autoload won't work because the module
      alias information is not filled. So user-space can't match the registered
      device with the corresponding module.
      
      Export the module alias information using the MODULE_DEVICE_TABLE() macro.
      
      Before this patch:
      
      $ modinfo drivers/bluetooth/btqcomsmd.ko | grep alias
      $
      
      After this patch:
      
      $ modinfo drivers/bluetooth/btqcomsmd.ko | grep alias
      alias:          of:N*T*Cqcom,wcnss-btC*
      alias:          of:N*T*Cqcom,wcnss-bt
      Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      747d3f1a
    • C
      Bluetooth: btusb: add support for 0bb4:0306 · a57bac43
      Christoph Haag 提交于
      It's a custom USB ID for the broadcom bt adapter in the HTC Vive.
      
      T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#=  6 Spd=12   MxCh= 0
      D:  Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=0bb4 ProdID=0306 Rev= 1.12
      S:  Manufacturer=Broadcom Corp
      S:  Product=BCM2045A0
      S:  SerialNumber=AC3743E110CE
      C:* #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=  0mA
      I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
      E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
      E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      I:  If#= 1 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      I:  If#= 1 Alt= 2 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      I:  If#= 1 Alt= 3 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      I:  If#= 1 Alt= 4 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      I:  If#= 1 Alt= 5 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=btusb
      E:  Ad=84(I) Atr=02(Bulk) MxPS=  32 Ivl=0ms
      E:  Ad=04(O) Atr=02(Bulk) MxPS=  32 Ivl=0ms
      I:* If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)
      
      dmesg:
      Bluetooth: hci0: BCM: chip id 102
      Bluetooth: hci0: c-l
      Bluetooth: hci0: BCM (001.001.005) build 0000
      Bluetooth: hci0: BCM (001.001.005) build 0481
      Bluetooth: hci0: BCM20703A1 Generic USB 20Mhz fcbga_BU
      Signed-off-by: NChristoph Haag <haagch@frickel.club>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      a57bac43
  2. 16 2月, 2017 15 次提交
  3. 15 2月, 2017 12 次提交