devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: devantech-srf04.yaml: add pm feature
@ 2020-01-02 17:27 Andreas Klinger
  2020-01-08 16:58 ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Klinger @ 2020-01-02 17:27 UTC (permalink / raw)
  To: jic23, robh+dt, mark.rutland
  Cc: knaack.h, lars, pmeerw, rpi-receiver, linux-iio, devicetree,
	linux-kernel

Add GPIO line and startup time for usage of power management

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
---
 .../bindings/iio/proximity/devantech-srf04.yaml          | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/proximity/devantech-srf04.yaml b/Documentation/devicetree/bindings/iio/proximity/devantech-srf04.yaml
index 4e80ea7c1475..b3fcb3b79485 100644
--- a/Documentation/devicetree/bindings/iio/proximity/devantech-srf04.yaml
+++ b/Documentation/devicetree/bindings/iio/proximity/devantech-srf04.yaml
@@ -51,6 +51,22 @@ properties:
       the time between two interrupts is measured in the driver.
     maxItems: 1
 
+  power-gpios:
+    description:
+      Definition of the GPIO for power management of connected peripheral
+      (output).
+      This GPIO can be used by the external hardware for power management.
+      When the device gets suspended it's switched off and when it resumes
+      it's switched on again. After some period of inactivity the driver
+      get suspended automatically (autosuspend feature).
+    maxItems: 1
+
+  startup-time-ms:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      This is the startup time the device needs after a resume to be up and
+      running.
+
 required:
   - compatible
   - trig-gpios
-- 
2.11.0

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

* Re: [PATCH 1/2] dt-bindings: devantech-srf04.yaml: add pm feature
  2020-01-02 17:27 [PATCH 1/2] dt-bindings: devantech-srf04.yaml: add pm feature Andreas Klinger
@ 2020-01-08 16:58 ` Rob Herring
  2020-01-09  7:10   ` Andreas Klinger
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2020-01-08 16:58 UTC (permalink / raw)
  To: Andreas Klinger
  Cc: jic23, mark.rutland, knaack.h, lars, pmeerw, rpi-receiver,
	linux-iio, devicetree, linux-kernel

On Thu, Jan 02, 2020 at 06:27:51PM +0100, Andreas Klinger wrote:
> Add GPIO line and startup time for usage of power management
> 
> Signed-off-by: Andreas Klinger <ak@it-klinger.de>
> ---
>  .../bindings/iio/proximity/devantech-srf04.yaml          | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/proximity/devantech-srf04.yaml b/Documentation/devicetree/bindings/iio/proximity/devantech-srf04.yaml
> index 4e80ea7c1475..b3fcb3b79485 100644
> --- a/Documentation/devicetree/bindings/iio/proximity/devantech-srf04.yaml
> +++ b/Documentation/devicetree/bindings/iio/proximity/devantech-srf04.yaml
> @@ -51,6 +51,22 @@ properties:
>        the time between two interrupts is measured in the driver.
>      maxItems: 1
>  
> +  power-gpios:
> +    description:
> +      Definition of the GPIO for power management of connected peripheral
> +      (output).
> +      This GPIO can be used by the external hardware for power management.
> +      When the device gets suspended it's switched off and when it resumes
> +      it's switched on again. After some period of inactivity the driver
> +      get suspended automatically (autosuspend feature).
> +    maxItems: 1
> +
> +  startup-time-ms:

Why isn't this implied by the compatible string? 

> +    $ref: /schemas/types.yaml#/definitions/uint32

You can drop this for standard units. 

0-2^32 is valid?

> +    description:
> +      This is the startup time the device needs after a resume to be up and
> +      running.
> +
>  required:
>    - compatible
>    - trig-gpios
> -- 
> 2.11.0

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

* Re: [PATCH 1/2] dt-bindings: devantech-srf04.yaml: add pm feature
  2020-01-08 16:58 ` Rob Herring
@ 2020-01-09  7:10   ` Andreas Klinger
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Klinger @ 2020-01-09  7:10 UTC (permalink / raw)
  To: Rob Herring
  Cc: jic23, mark.rutland, knaack.h, lars, pmeerw, rpi-receiver,
	linux-iio, devicetree, linux-kernel

Hi Rob,

see below.

Rob Herring <robh@kernel.org> schrieb am Mi, 08. Jan 10:58:
> On Thu, Jan 02, 2020 at 06:27:51PM +0100, Andreas Klinger wrote:
> > Add GPIO line and startup time for usage of power management
> > 
> > Signed-off-by: Andreas Klinger <ak@it-klinger.de>
> > ---
> >  .../bindings/iio/proximity/devantech-srf04.yaml          | 16 ++++++++++++++++
> >  1 file changed, 16 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/proximity/devantech-srf04.yaml b/Documentation/devicetree/bindings/iio/proximity/devantech-srf04.yaml
> > index 4e80ea7c1475..b3fcb3b79485 100644
> > --- a/Documentation/devicetree/bindings/iio/proximity/devantech-srf04.yaml
> > +++ b/Documentation/devicetree/bindings/iio/proximity/devantech-srf04.yaml
> > @@ -51,6 +51,22 @@ properties:
> >        the time between two interrupts is measured in the driver.
> >      maxItems: 1
> >  
> > +  power-gpios:
> > +    description:
> > +      Definition of the GPIO for power management of connected peripheral
> > +      (output).
> > +      This GPIO can be used by the external hardware for power management.
> > +      When the device gets suspended it's switched off and when it resumes
> > +      it's switched on again. After some period of inactivity the driver
> > +      get suspended automatically (autosuspend feature).
> > +    maxItems: 1
> > +
> > +  startup-time-ms:
> 
> Why isn't this implied by the compatible string? 

Under the same trade name "SRF-04" there are many different sensors on the
market which are clones of the original one from Devantech. They are equipped
with different hardware components and they have a slightly different behavior,
such as the startup time. 

> 
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> 
> You can drop this for standard units. 
> 
> 0-2^32 is valid?

I can add boundaries here.

> 
> > +    description:
> > +      This is the startup time the device needs after a resume to be up and
> > +      running.
> > +
> >  required:
> >    - compatible
> >    - trig-gpios
> > -- 
> > 2.11.0

Andreas

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

end of thread, other threads:[~2020-01-09  7:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-02 17:27 [PATCH 1/2] dt-bindings: devantech-srf04.yaml: add pm feature Andreas Klinger
2020-01-08 16:58 ` Rob Herring
2020-01-09  7:10   ` Andreas Klinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).