Documentation/devicetree/bindings/regulator/gpio-regulator.yaml

Source file repositories/reference/linux-study-clean/Documentation/devicetree/bindings/regulator/gpio-regulator.yaml

File Facts

System
Linux kernel
Corpus path
Documentation/devicetree/bindings/regulator/gpio-regulator.yaml
Extension
.yaml
Size
3219 bytes
Lines
123
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: configuration, schema, or hardware description
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/gpio-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: GPIO controlled regulators

maintainers:
  - Liam Girdwood <lgirdwood@gmail.com>
  - Mark Brown <broonie@kernel.org>

description:
  Any property defined as part of the core regulator binding, defined in
  regulator.txt, can also be used.

allOf:
  - $ref: regulator.yaml#

properties:
  compatible:
    const: regulator-gpio

  regulator-name: true

  enable-gpios:
    description: GPIO to use to enable/disable the regulator.
      Warning, the GPIO phandle flags are ignored and the GPIO polarity is
      controlled solely by the presence of "enable-active-high" DT property.
      This is due to compatibility with old DTs.
    maxItems: 1

  gpios:
    description: Array of one or more GPIO pins used to select the regulator
      voltage/current listed in "states".
    minItems: 1
    maxItems: 8  # Should be enough...

  gpios-states:
    description: |
      On operating systems, that don't support reading back gpio values in
      output mode (most notably linux), this array provides the state of GPIO
      pins set when requesting them from the gpio controller. Systems, that are
      capable of preserving state when requesting the lines, are free to ignore
      this property.
        0: LOW
        1: HIGH
      Default is LOW if nothing else is specified.
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 1
    maxItems: 8
    items:
      enum: [0, 1]
      default: 0

  states:
    description: Selection of available voltages/currents provided by this
      regulator and matching GPIO configurations to achieve them. If there are
      no states in the "states" array, use a fixed regulator instead.
    $ref: /schemas/types.yaml#/definitions/uint32-matrix
    minItems: 2
    maxItems: 256
    items:
      items:
        - description: Voltage in microvolts
        - description: GPIO group state value

  startup-delay-us:
    description: startup time in microseconds

Annotation

Implementation Notes