forked from Freescale/linux-fslc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bluetooth: btusb: Add out-of-band wakeup support
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: Rajat Jain <[email protected]> Reviewed-by: Brian Norris <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
- Loading branch information
Showing
2 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Generic Bluetooth controller over USB (btusb driver) | ||
--------------------------------------------------- | ||
|
||
Required properties: | ||
|
||
- compatible : should comply with the format "usbVID,PID" specified in | ||
Documentation/devicetree/bindings/usb/usb-device.txt | ||
At the time of writing, the only OF supported devices | ||
(more may be added later) are: | ||
|
||
"usb1286,204e" (Marvell 8997) | ||
|
||
Optional properties: | ||
|
||
- interrupt-parent: phandle of the parent interrupt controller | ||
- interrupt-names: (see below) | ||
- interrupts : The interrupt specified by the name "wakeup" is the interrupt | ||
that shall be used for out-of-band wake-on-bt. Driver will | ||
request this interrupt for wakeup. During system suspend, the | ||
irq will be enabled so that the bluetooth chip can wakeup host | ||
platform out of band. During system resume, the irq will be | ||
disabled to make sure unnecessary interrupt is not received. | ||
|
||
Example: | ||
|
||
Following example uses irq pin number 3 of gpio0 for out of band wake-on-bt: | ||
|
||
&usb_host1_ehci { | ||
status = "okay"; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
mvl_bt1: bt@1 { | ||
compatible = "usb1286,204e"; | ||
reg = <1>; | ||
interrupt-parent = <&gpio0>; | ||
interrupt-name = "wakeup"; | ||
interrupts = <3 IRQ_TYPE_LEVEL_LOW>; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters