diff mbox series

[v5,1/2] dt-bindings: net: bluetooth: add interrupts properties

Message ID 20191213150622.14162-2-glaroque@baylibre.com
State Changes Requested, archived
Headers show
Series add support of interrupt for host wakeup from devicetree in BCM HCI driver | expand

Checks

Context Check Description
robh/checkpatch success

Commit Message

Guillaume LA ROQUE Dec. 13, 2019, 3:06 p.m. UTC
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>
---
 Documentation/devicetree/bindings/net/broadcom-bluetooth.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Johan Hovold Dec. 13, 2019, 4:19 p.m. UTC | #1
On Fri, Dec 13, 2019 at 04:06:21PM +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>
> ---
>  Documentation/devicetree/bindings/net/broadcom-bluetooth.txt | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt b/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt
> index b5eadee4a9a7..95912d979239 100644
> --- a/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt
> +++ b/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt
> @@ -36,7 +36,9 @@ 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 if
> +   gpiod_to_irq function not supported

This is a Linux implementation detail which therefore doesn't belong in
the binding.

I think the general rule is to prefer interrupts over gpios where we
have a choice, but here the current binding already has a
host-wakeup-gpios.

Not sure how best to handle that, maybe Rob knows.

> + - interrupt-names: must be "host-wakeup"
>  
>  Example:

Oh, and please keep people commenting on your patches on CC when you
submit new versions.

Johan
Rob Herring (Arm) Dec. 18, 2019, 8:38 p.m. UTC | #2
On Fri, Dec 13, 2019 at 05:19:01PM +0100, Johan Hovold wrote:
> On Fri, Dec 13, 2019 at 04:06:21PM +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>
> > ---
> >  Documentation/devicetree/bindings/net/broadcom-bluetooth.txt | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt b/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt
> > index b5eadee4a9a7..95912d979239 100644
> > --- a/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt
> > +++ b/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt
> > @@ -36,7 +36,9 @@ 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 if
> > +   gpiod_to_irq function not supported
> 
> This is a Linux implementation detail which therefore doesn't belong in
> the binding.
> 
> I think the general rule is to prefer interrupts over gpios where we
> have a choice, but here the current binding already has a
> host-wakeup-gpios.
> 
> Not sure how best to handle that, maybe Rob knows.

Use gpiod_to_irqd().

You can also deprecate the gpio prop, but you have to keep driver 
support for it. And updating dts files would break old kernels with new 
dtbs.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt b/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt
index b5eadee4a9a7..95912d979239 100644
--- a/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt
+++ b/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt
@@ -36,7 +36,9 @@  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 if
+   gpiod_to_irq function not supported
+ - interrupt-names: must be "host-wakeup"
 
 Example: