SBS compliant manager

Schema identifier ($id): "http://devicetree.org/schemas/power/supply/sbs,sbs-manager.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Sebastian Reichel <sre@kernel.org>"

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): power-supply.yaml#

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Array item rules (items)

Item 1

Allowed values (enum): "lltc,ltc1760"

Item 2

Allowed values (enum): "sbs,sbs-manager"

Rule 2

Array item rules (items)

Item 1

Exact value (const): "sbs,sbs-manager"

reg — required here #

Exact value (const): 10

#address-cells — not listed as required here #

Exact value (const): 1

#size-cells — not listed as required here #

Exact value (const): 0

gpio-controller — not listed as required here #

true — No constraints added by this property rule.

#gpio-cells — not listed as required here #

Exact value (const): 2

Required in this object (required): "compatible", "reg"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Properties matching a name pattern (patternProperties) #

^i2c@[1-4]$ — name matches this regular expression #

Value type (type): "object"

Shared schema rule ($ref): /schemas/i2c/i2c-controller.yaml#

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Properties and child nodes (properties) #

reg — not listed as required here

Minimum value (minimum): 1

Maximum value (maximum): 4

Examples (examples) #

#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>

i2c {
  #address-cells = <1>;
  #size-cells = <0>;

  batman: battery-manager@a {
    compatible = "lltc,ltc1760", "sbs,sbs-manager";
    reg = <0x0a>;
    #address-cells = <1>;
    #size-cells = <0>;

    gpio-controller;
    #gpio-cells = <2>;

    i2c@1 {
      #address-cells = <1>;
      #size-cells = <0>;
      reg = <1>;

      battery@b {
        compatible = "ti,bq20z65", "sbs,sbs-battery";
        reg = <0x0b>;
        sbs,battery-detect-gpios = <&batman 1 1>;
      };
    };

    i2c@2 {
      #address-cells = <1>;
      #size-cells = <0>;
      reg = <2>;

      battery@b {
        compatible = "ti,bq20z65", "sbs,sbs-battery";
        reg = <0x0b>;
        sbs,battery-detect-gpios = <&batman 2 1>;
      };
    };

    i2c@3 {
      #address-cells = <1>;
      #size-cells = <0>;
      reg = <3>;

      battery@b {
        compatible = "ti,bq20z65", "sbs,sbs-battery";
        reg = <0x0b>;
        sbs,battery-detect-gpios = <&batman 3 1>;
      };
    };
  };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0

Edit this page