All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Dan Murphy <dmurphy@ti.com>
Cc: sre@kernel.org, devicetree@vger.kernel.org,
	r-rivera-matos@ti.com, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: power: Add the bq25790 dt bindings
Date: Fri, 31 Jul 2020 16:40:27 -0600	[thread overview]
Message-ID: <20200731224027.GA923778@bogus> (raw)
In-Reply-To: <20200730145834.29227-1-dmurphy@ti.com>

On Thu, Jul 30, 2020 at 09:58:33AM -0500, Dan Murphy wrote:
> Add the bindings for the bq25790.
> 
> Signed-off-by: Ricardo Rivera-Matos <r-rivera-matos@ti.com>
> Signed-off-by: Dan Murphy <dmurphy@ti.com>
> ---
>  .../bindings/power/supply/bq25790.yaml        | 87 +++++++++++++++++++
>  1 file changed, 87 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/power/supply/bq25790.yaml
> 
> diff --git a/Documentation/devicetree/bindings/power/supply/bq25790.yaml b/Documentation/devicetree/bindings/power/supply/bq25790.yaml
> new file mode 100644
> index 000000000000..97dd539c1625
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/supply/bq25790.yaml
> @@ -0,0 +1,87 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +# Copyright (C) 2020 Texas Instruments Incorporated
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/power/supply/bq25790.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> +
> +title: TI BQ25790 Switch Mode Buck-Boost Charger
> +
> +maintainers:
> +  - Dan Murphy <dmurphy@ti.com>
> +
> +description: |
> +  BQ25790 is a highly integrated switch-mode buck-boost charger for 1-4 cell
> +  Li-ion batteries and Li-polymer batteries. The device charges a battery from a
> +  wide range of input sources including legacy USB adapters to high voltage USB
> +  PD adapters and traditional barrel adapters.
> +
> +allOf:
> +  - $ref: power-supply.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - ti,bq25790
> +      - ti,bq25792
> +
> +  reg:
> +    maxItems: 1
> +
> +  ti,watchdog-timer:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description: |
> +      Watchdog timer in milli seconds. 0 (default) disables the watchdog.

Add a standard unit suffix and you can drop the type. And maybe 
s/timer/timeout/ would be a bit clearer.

Also:

default: 0

> +    minimum: 0
> +    maximum: 160000
> +    enum: [ 0, 500, 1000, 2000, 20000, 40000, 80000, 160000]
> +
> +  input-voltage-limit-microvolt:
> +    description: |
> +      Minimum input voltage limit in micro volts with a 100000 micro volt step.
> +    minimum: 3600000
> +    maximum: 22000000
> +
> +  input-current-limit-microamp:
> +    description: |
> +      Maximum input current limit in micro amps with a 100000 micro amp step.
> +    minimum: 100000
> +    maximum: 3300000
> +
> +  monitored-battery:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description: phandle to the battery node being monitored
> +
> +required:
> +  - compatible
> +  - reg
> +  - monitored-battery

Add:

unevaluatedProperties: false

> +
> +examples:
> +  - |
> +    bat: battery {
> +      compatible = "simple-battery";
> +      constant-charge-current-max-microamp = <2000000>;
> +      constant-charge-voltage-max-microvolt = <4200000>;
> +      precharge-current-microamp = <160000>;
> +      charge-term-current-microamp = <160000>;
> +    };
> +    #include <dt-bindings/gpio/gpio.h>
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    i2c0 {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      bq25790: charger@6b {
> +          compatible = "ti,bq25790";
> +          reg = <0x6b>;
> +          interrupt-parent = <&gpio1>;
> +          interrupts = <16 IRQ_TYPE_EDGE_FALLING>;

Not documented.

> +          ti,watchdog-timer = <2000>;
> +          input-current-limit = <3000000>;
> +          input-voltage-limit = <4500000>;

Doesn't match the schema.

> +          monitored-battery = <&bat>;
> +      };
> +    };
> +
> +...
> -- 
> 2.28.0
> 

      parent reply	other threads:[~2020-07-31 22:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-30 14:58 [PATCH 1/2] dt-bindings: power: Add the bq25790 dt bindings Dan Murphy
2020-07-30 14:58 ` [PATCH 2/2] power: supply: bq25790: Introduce the BQ25790 charger driver Dan Murphy
2020-07-30 15:14   ` Ricardo Rivera-Matos
2020-08-05 11:59   ` Dan Carpenter
2020-08-05 11:59     ` Dan Carpenter
2020-08-05 11:59     ` Dan Carpenter
2020-07-31 22:40 ` Rob Herring [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200731224027.GA923778@bogus \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmurphy@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=r-rivera-matos@ti.com \
    --cc=sre@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.