All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v7 0/2] add support of interrupt for host wakeup from devicetree in BCM HCI driver
@ 2020-01-15 10:12 Guillaume La Roque
  2020-01-15 10:12 ` [PATCH v7 1/2] dt-bindings: net: bluetooth: add interrupts properties Guillaume La Roque
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Guillaume La Roque @ 2020-01-15 10:12 UTC (permalink / raw)
  To: marcel, johan.hedberg, devicetree, linux-bluetooth
  Cc: johan, nsaenzjulienne, linux-kernel, khilman

add interrupts and interrupt-names properties to set host wakeup IRQ.
actually driver find this IRQ from host-wakeup-gpios propety
but some platforms are not supported gpiod_to_irq function.
so to have possibility to use interrupt mode we need to add interrupts
field in devicetree and support it in driver.

change sinve v6:
- depracate host-wakeup-gpios 

change sinve v5:
- add tags

change sinve v4 [1]:
- add patch to update Documentation
- use of_irq_get_byname to be more clear and move call in bcm_of_probe
- update commit message

change since v3:
- move on of_irq instead of platform_get_irq

change since v2:
- fix commit message

change since v1:
- rebase patch

[1] https://lore.kernel.org/linux-bluetooth/20191213105521.4290-1-glaroque@baylibre.com/

Guillaume La Roque (2):
  dt-bindings: net: bluetooth: add interrupts properties
  bluetooth: hci_bcm: enable IRQ capability from devicetree

 .../devicetree/bindings/net/broadcom-bluetooth.txt         | 7 +++++--
 drivers/bluetooth/hci_bcm.c                                | 3 +++
 2 files changed, 8 insertions(+), 2 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v7 1/2] dt-bindings: net: bluetooth: add interrupts properties
  2020-01-15 10:12 [PATCH v7 0/2] add support of interrupt for host wakeup from devicetree in BCM HCI driver Guillaume La Roque
@ 2020-01-15 10:12 ` Guillaume La Roque
  2020-01-15 20:17   ` Rob Herring
  2020-01-15 10:12 ` [PATCH v7 2/2] bluetooth: hci_bcm: enable IRQ capability from devicetree Guillaume La Roque
  2020-01-15 21:32 ` [PATCH v7 0/2] add support of interrupt for host wakeup from devicetree in BCM HCI driver Marcel Holtmann
  2 siblings, 1 reply; 5+ messages in thread
From: Guillaume La Roque @ 2020-01-15 10:12 UTC (permalink / raw)
  To: marcel, johan.hedberg, devicetree, linux-bluetooth
  Cc: johan, nsaenzjulienne, linux-kernel, khilman

add interrupts and interrupt-names as optional properties
to support host-wakeup by interrupt properties instead of
host-wakeup-gpios.

Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
---
 .../devicetree/bindings/net/broadcom-bluetooth.txt         | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt b/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt
index c44a30dbe43d..dd258674633c 100644
--- a/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt
+++ b/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt
@@ -23,7 +23,9 @@ Optional properties:
  - max-speed: see Documentation/devicetree/bindings/serial/slave-device.txt
  - shutdown-gpios: GPIO specifier, used to enable the BT module
  - device-wakeup-gpios: GPIO specifier, used to wakeup the controller
- - host-wakeup-gpios: GPIO specifier, used to wakeup the host processor
+ - host-wakeup-gpios: GPIO specifier, used to wakeup the host processor.
+                      deprecated, replaced by interrupts and
+                      "host-wakeup" interrupt-names
  - clocks: 1 or 2 clocks as defined in clock-names below, in that order
  - clock-names: names for clock inputs, matching the clocks given
    - "extclk": deprecated, replaced by "txco"
@@ -37,7 +39,8 @@ Optional properties:
     - pcm-frame-type: short, long
     - pcm-sync-mode: slave, master
     - pcm-clock-mode: slave, master
-
+ - interrupts: must be one, used to wakeup the host processor
+ - interrupt-names: must be "host-wakeup"
 
 Example:
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v7 2/2] bluetooth: hci_bcm: enable IRQ capability from devicetree
  2020-01-15 10:12 [PATCH v7 0/2] add support of interrupt for host wakeup from devicetree in BCM HCI driver Guillaume La Roque
  2020-01-15 10:12 ` [PATCH v7 1/2] dt-bindings: net: bluetooth: add interrupts properties Guillaume La Roque
@ 2020-01-15 10:12 ` Guillaume La Roque
  2020-01-15 21:32 ` [PATCH v7 0/2] add support of interrupt for host wakeup from devicetree in BCM HCI driver Marcel Holtmann
  2 siblings, 0 replies; 5+ messages in thread
From: Guillaume La Roque @ 2020-01-15 10:12 UTC (permalink / raw)
  To: marcel, johan.hedberg, devicetree, linux-bluetooth
  Cc: johan, nsaenzjulienne, linux-kernel, khilman

Add support for getting IRQ directly from DT instead of relying on
converting a GPIO to IRQ. This is needed for platforms with GPIO
controllers that that do not support gpiod_to_irq().

Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
---
 drivers/bluetooth/hci_bcm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
index 769bb4404bd1..b236cb11c0dc 100644
--- a/drivers/bluetooth/hci_bcm.c
+++ b/drivers/bluetooth/hci_bcm.c
@@ -13,6 +13,7 @@
 #include <linux/module.h>
 #include <linux/acpi.h>
 #include <linux/of.h>
+#include <linux/of_irq.h>
 #include <linux/property.h>
 #include <linux/platform_data/x86/apple.h>
 #include <linux/platform_device.h>
@@ -1151,6 +1152,8 @@ static int bcm_of_probe(struct bcm_device *bdev)
 	device_property_read_u32(bdev->dev, "max-speed", &bdev->oper_speed);
 	device_property_read_u8_array(bdev->dev, "brcm,bt-pcm-int-params",
 				      bdev->pcm_int_params, 5);
+	bdev->irq = of_irq_get_byname(bdev->dev->of_node, "host-wakeup");
+
 	return 0;
 }
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v7 1/2] dt-bindings: net: bluetooth: add interrupts properties
  2020-01-15 10:12 ` [PATCH v7 1/2] dt-bindings: net: bluetooth: add interrupts properties Guillaume La Roque
@ 2020-01-15 20:17   ` Rob Herring
  0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2020-01-15 20:17 UTC (permalink / raw)
  To: Guillaume La Roque
  Cc: marcel, johan.hedberg, devicetree, linux-bluetooth, johan,
	nsaenzjulienne, linux-kernel, khilman

On Wed, 15 Jan 2020 11:12:42 +0100, Guillaume La Roque wrote:
> add interrupts and interrupt-names as optional properties
> to support host-wakeup by interrupt properties instead of
> host-wakeup-gpios.
> 
> Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
> ---
>  .../devicetree/bindings/net/broadcom-bluetooth.txt         | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v7 0/2] add support of interrupt for host wakeup from devicetree in BCM HCI driver
  2020-01-15 10:12 [PATCH v7 0/2] add support of interrupt for host wakeup from devicetree in BCM HCI driver Guillaume La Roque
  2020-01-15 10:12 ` [PATCH v7 1/2] dt-bindings: net: bluetooth: add interrupts properties Guillaume La Roque
  2020-01-15 10:12 ` [PATCH v7 2/2] bluetooth: hci_bcm: enable IRQ capability from devicetree Guillaume La Roque
@ 2020-01-15 21:32 ` Marcel Holtmann
  2 siblings, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2020-01-15 21:32 UTC (permalink / raw)
  To: Guillaume La Roque
  Cc: Johan Hedberg, devicetree, linux-bluetooth, johan,
	nsaenzjulienne, linux-kernel, khilman

Hi Guillaume,

> add interrupts and interrupt-names properties to set host wakeup IRQ.
> actually driver find this IRQ from host-wakeup-gpios propety
> but some platforms are not supported gpiod_to_irq function.
> so to have possibility to use interrupt mode we need to add interrupts
> field in devicetree and support it in driver.
> 
> change sinve v6:
> - depracate host-wakeup-gpios 
> 
> change sinve v5:
> - add tags
> 
> change sinve v4 [1]:
> - add patch to update Documentation
> - use of_irq_get_byname to be more clear and move call in bcm_of_probe
> - update commit message
> 
> change since v3:
> - move on of_irq instead of platform_get_irq
> 
> change since v2:
> - fix commit message
> 
> change since v1:
> - rebase patch
> 
> [1] https://lore.kernel.org/linux-bluetooth/20191213105521.4290-1-glaroque@baylibre.com/
> 
> Guillaume La Roque (2):
>  dt-bindings: net: bluetooth: add interrupts properties
>  bluetooth: hci_bcm: enable IRQ capability from devicetree
> 
> .../devicetree/bindings/net/broadcom-bluetooth.txt         | 7 +++++--
> drivers/bluetooth/hci_bcm.c                                | 3 +++
> 2 files changed, 8 insertions(+), 2 deletions(-)

both patches have been applied to bluetooth-next tree.

Regards

Marcel


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-01-15 21:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-15 10:12 [PATCH v7 0/2] add support of interrupt for host wakeup from devicetree in BCM HCI driver Guillaume La Roque
2020-01-15 10:12 ` [PATCH v7 1/2] dt-bindings: net: bluetooth: add interrupts properties Guillaume La Roque
2020-01-15 20:17   ` Rob Herring
2020-01-15 10:12 ` [PATCH v7 2/2] bluetooth: hci_bcm: enable IRQ capability from devicetree Guillaume La Roque
2020-01-15 21:32 ` [PATCH v7 0/2] add support of interrupt for host wakeup from devicetree in BCM HCI driver Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.