Commit d30fc97c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull regulator updates from Mark Brown:
 "The big change in this release is that Matti Vaittinen has factored
  out the linear ranges support into a separate library in lib/ since it
  is also useful for at least the power subsystem (and most likely
  others too), it helps subsystems which need to map register values
  into more useful real world values do so with minimal per-driver code.

   - Factoring out of the linear ranges support into a library in lib/
     from Matti Vaittinen.

   - Trace points for bypass mode.

   - Use the consumer name in debugfs to make it easier to understand.

   - New drivers for Maxim MAX77826 and MAX8998"

* tag 'regulator-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (23 commits)
  regulator: max8998: max8998_set_current_limit() can be static
  dt-bindings: regulator: Convert anatop regulator to json-schema
  regulator: core: Add regulator bypass trace points
  regulator: extract voltage balancing code to the separate function
  regulator/mfd: max8998: Document charger regulator
  regulator: max8998: Add charger regulator
  MAINTAINERS: Add maintainer entry for linear ranges helper
  regulator: bd718x7: remove voltage change restriction from BD71847 LDOs
  lib: linear_ranges: Add missing MODULE_LICENSE()
  regulator: use linear_ranges helper
  power: supply: bd70528: rename linear_range to avoid collision
  lib/test_linear_ranges: add a test for the 'linear_ranges'
  lib: add linear ranges helpers
  regulator: db8500-prcmu: Use true,false for bool variable
  regulator: bd718x7: remove voltage change restriction from BD71847
  regulator: max77826: Remove erroneous additionalProperties
  regulator: qcom-rpmh: Fix typos in pm8150 and pm8150l
  regulator: Document bindings for max77826
  regulator: max77826: Add max77826 regulator driver
  regulator: tps80031: remove redundant assignment to variables ret and val
  ...
parents a36de5eb 5fb565b6
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -73,6 +73,8 @@ number as described in MAX8998 datasheet.
	- ESAFEOUT1: (ldo19)
	- ESAFEOUT2: (ld020)

	- CHARGER: main battery charger current control

Standard regulator bindings are used inside regulator subnodes. Check
  Documentation/devicetree/bindings/regulator/regulator.txt
for more details.
@@ -113,5 +115,11 @@ Example:
				regulator-always-on;
				regulator-boot-on;
			};

			charger_reg: CHARGER {
				regulator-name = "CHARGER";
				regulator-min-microamp = <90000>;
				regulator-max-microamp = <800000>;
			};
		};
	};
+0 −40
Original line number Diff line number Diff line
Anatop Voltage regulators

Required properties:
- compatible: Must be "fsl,anatop-regulator"
- regulator-name: A string used as a descriptive name for regulator outputs
- anatop-reg-offset: Anatop MFD register offset
- anatop-vol-bit-shift: Bit shift for the register
- anatop-vol-bit-width: Number of bits used in the register
- anatop-min-bit-val: Minimum value of this register
- anatop-min-voltage: Minimum voltage of this regulator
- anatop-max-voltage: Maximum voltage of this regulator

Optional properties:
- anatop-delay-reg-offset: Anatop MFD step time register offset
- anatop-delay-bit-shift: Bit shift for the step time register
- anatop-delay-bit-width: Number of bits used in the step time register
- vin-supply: The supply for this regulator
- anatop-enable-bit: Regulator enable bit offset

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

Example:

	regulator-vddpu {
		compatible = "fsl,anatop-regulator";
		regulator-name = "vddpu";
		regulator-min-microvolt = <725000>;
		regulator-max-microvolt = <1300000>;
		regulator-always-on;
		anatop-reg-offset = <0x140>;
		anatop-vol-bit-shift = <9>;
		anatop-vol-bit-width = <5>;
		anatop-delay-reg-offset = <0x170>;
		anatop-delay-bit-shift = <24>;
		anatop-delay-bit-width = <2>;
		anatop-min-bit-val = <1>;
		anatop-min-voltage = <725000>;
		anatop-max-voltage = <1300000>;
	};
+94 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/anatop-regulator.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Freescale Anatop Voltage Regulators

maintainers:
  - Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>

allOf:
  - $ref: "regulator.yaml#"

properties:
  compatible:
    const: fsl,anatop-regulator

  regulator-name: true

  anatop-reg-offset:
    $ref: '/schemas/types.yaml#/definitions/uint32'
    description: u32 value representing the anatop MFD register offset.

  anatop-vol-bit-shift:
    $ref: '/schemas/types.yaml#/definitions/uint32'
    description: u32 value representing the bit shift for the register.

  anatop-vol-bit-width:
    $ref: '/schemas/types.yaml#/definitions/uint32'
    description: u32 value representing the number of bits used in the register.

  anatop-min-bit-val:
    $ref: '/schemas/types.yaml#/definitions/uint32'
    description: u32 value representing the minimum value of this register.

  anatop-min-voltage:
    $ref: '/schemas/types.yaml#/definitions/uint32'
    description: u32 value representing the minimum voltage of this regulator.

  anatop-max-voltage:
    $ref: '/schemas/types.yaml#/definitions/uint32'
    description: u32 value representing the maximum voltage of this regulator.

  anatop-delay-reg-offset:
    $ref: '/schemas/types.yaml#/definitions/uint32'
    description: u32 value representing the anatop MFD step time register offset.

  anatop-delay-bit-shift:
    $ref: '/schemas/types.yaml#/definitions/uint32'
    description: u32 value representing the bit shift for the step time register.

  anatop-delay-bit-width:
    $ref: '/schemas/types.yaml#/definitions/uint32'
    description: u32 value representing the number of bits used in the step time register.

  anatop-enable-bit:
    $ref: '/schemas/types.yaml#/definitions/uint32'
    description: u32 value representing regulator enable bit offset.

  vin-supply:
    $ref: '/schemas/types.yaml#/definitions/phandle'
    description: input supply phandle.

required:
  - compatible
  - regulator-name
  - anatop-reg-offset
  - anatop-vol-bit-shift
  - anatop-vol-bit-width
  - anatop-min-bit-val
  - anatop-min-voltage
  - anatop-max-voltage

unevaluatedProperties: false

examples:
  - |
    regulator-vddpu {
        compatible = "fsl,anatop-regulator";
        regulator-name = "vddpu";
        regulator-min-microvolt = <725000>;
        regulator-max-microvolt = <1300000>;
        regulator-always-on;
        anatop-reg-offset = <0x140>;
        anatop-vol-bit-shift = <9>;
        anatop-vol-bit-width = <5>;
        anatop-delay-reg-offset = <0x170>;
        anatop-delay-bit-shift = <24>;
        anatop-delay-bit-width = <2>;
        anatop-min-bit-val = <1>;
        anatop-min-voltage = <725000>;
        anatop-max-voltage = <1300000>;
    };
+68 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/maxim,max77826.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Maxim Integrated MAX77826 PMIC

maintainers:
  - Iskren Chernev <iskren.chernev@gmail.com>

properties:
  $nodename:
    pattern: "pmic@[0-9a-f]{1,2}"
  compatible:
    enum:
      - maxim,max77826

  reg:
    maxItems: 1

  regulators:
    type: object
    allOf:
      - $ref: regulator.yaml#
    description: |
      list of regulators provided by this controller, must be named
      after their hardware counterparts LDO[1-15], BUCK and BUCKBOOST

    patternProperties:
      "^LDO([1-9]|1[0-5])$":
        type: object
        allOf:
          - $ref: regulator.yaml#

      "^BUCK|BUCKBOOST$":
        type: object
        allOf:
          - $ref: regulator.yaml#

    additionalProperties: false

required:
  - compatible
  - reg
  - regulators

additionalProperties: false

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

        pmic@69 {
            compatible = "maxim,max77826";
            reg = <0x69>;

            regulators {
                LDO2 {
                    regulator-min-microvolt = <650000>;
                    regulator-max-microvolt = <3587500>;
                };
            };
       };
     };
...
+7 −0
Original line number Diff line number Diff line
@@ -9748,6 +9748,13 @@ F: drivers/lightnvm/
F:	include/linux/lightnvm.h
F:	include/uapi/linux/lightnvm.h
LINEAR RANGES HELPERS
M:	Mark Brown <broonie@kernel.org>
R:	Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
F:	lib/linear_ranges.c
F:	lib/test_linear_ranges.c
F:	include/linux/linear_range.h
LINUX FOR POWER MACINTOSH
M:	Benjamin Herrenschmidt <benh@kernel.crashing.org>
L:	linuxppc-dev@lists.ozlabs.org
Loading