linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] leds/power/regulator/mfd: dt-bindings: maxim,max77693: convert to dtschema
@ 2022-01-11 17:50 Krzysztof Kozlowski
  2022-01-11 17:50 ` [PATCH v2 1/4] dt-bindings: leds: " Krzysztof Kozlowski
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2022-01-11 17:50 UTC (permalink / raw)
  To: Chanwoo Choi, Krzysztof Kozlowski, Pavel Machek, Rob Herring,
	Lee Jones, Sebastian Reichel, Liam Girdwood, Mark Brown,
	linux-kernel, linux-leds, devicetree, linux-pm

Hi,

Changes since v1
================
1. MFD: Use absolute path to schemas, add additionalProperties=false.
2. Regulator: mention all allowed properties,
   additionalProperties=false, add min/max values for voltages and
   current, don't use patternProperties when not needed.

Dependencies
============
The final patch - MFD maxim,max77693 bindings conversion - depends on
all previous. Therefore this could go via Rob's or Lee's trees.

Best regards,
Krzysztof

Krzysztof Kozlowski (4):
  dt-bindings: leds: maxim,max77693: convert to dtschema
  dt-bindings: power: supply: maxim,max77693: convert to dtschema
  regulator: dt-bindings: maxim,max77693: convert to dtschema
  dt-bindings: mfd: maxim,max77693: convert to dtschema

 .../bindings/leds/maxim,max77693.yaml         | 105 ++++++++++
 .../devicetree/bindings/mfd/max77693.txt      | 194 ------------------
 .../bindings/mfd/maxim,max77693.yaml          | 143 +++++++++++++
 .../bindings/power/supply/maxim,max77693.yaml |  70 +++++++
 .../bindings/regulator/maxim,max77693.yaml    |  60 ++++++
 MAINTAINERS                                   |   3 +-
 6 files changed, 380 insertions(+), 195 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/leds/maxim,max77693.yaml
 delete mode 100644 Documentation/devicetree/bindings/mfd/max77693.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/maxim,max77693.yaml
 create mode 100644 Documentation/devicetree/bindings/power/supply/maxim,max77693.yaml
 create mode 100644 Documentation/devicetree/bindings/regulator/maxim,max77693.yaml

-- 
2.32.0


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

* [PATCH v2 1/4] dt-bindings: leds: maxim,max77693: convert to dtschema
  2022-01-11 17:50 [PATCH v2 0/4] leds/power/regulator/mfd: dt-bindings: maxim,max77693: convert to dtschema Krzysztof Kozlowski
@ 2022-01-11 17:50 ` Krzysztof Kozlowski
  2022-01-11 22:29   ` Rob Herring
  2022-01-11 17:50 ` [PATCH v2 2/4] dt-bindings: power: supply: " Krzysztof Kozlowski
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2022-01-11 17:50 UTC (permalink / raw)
  To: Chanwoo Choi, Krzysztof Kozlowski, Pavel Machek, Rob Herring,
	Lee Jones, Sebastian Reichel, Liam Girdwood, Mark Brown,
	linux-kernel, linux-leds, devicetree, linux-pm

Convert the LEDs bindings of Maxim MAX77693 MUIC to DT schema format.
The existing bindings were defined in ../bindings/mfd/max77693.txt.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
 .../bindings/leds/maxim,max77693.yaml         | 105 ++++++++++++++++++
 1 file changed, 105 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/maxim,max77693.yaml

diff --git a/Documentation/devicetree/bindings/leds/maxim,max77693.yaml b/Documentation/devicetree/bindings/leds/maxim,max77693.yaml
new file mode 100644
index 000000000000..86a0005cf156
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/maxim,max77693.yaml
@@ -0,0 +1,105 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/maxim,max77693.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim MAX77693 MicroUSB and Companion Power Management IC LEDs
+
+maintainers:
+  - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
+
+description: |
+  This is a part of device tree bindings for Maxim MAX77693 MicroUSB Integrated
+  Circuit (MUIC).
+
+  There are two LED outputs available - FLED1 and FLED2. Each of them can
+  control a separate LED or they can be connected together to double the
+  maximum current for a single connected LED. One LED is represented by one
+  child node.
+
+  See also Documentation/devicetree/bindings/mfd/maxim,max77693.yaml for
+  additional information and example.
+
+properties:
+  compatible:
+    const: maxim,max77693-led
+
+  maxim,boost-mode:
+    description:
+      In boost mode the device can produce up to 1.2A of total current on both
+      outputs. The maximum current on each output is reduced to 625mA then. If
+      not enabled explicitly, boost setting defaults to LEDS_BOOST_FIXED in
+      case both current sources are used.
+      See LEDS_BOOST_* in include/dt-bindings/leds/common.h.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [0, 1, 2]
+
+  maxim,boost-mvout:
+    description: |
+      Output voltage of the boost module in millivolts.
+      Valid values: 3300 - 5500, step by 25 (rounded down)
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 3300
+    maximum: 5500
+    default: 3300
+
+  maxim,mvsys-min:
+    description: |
+      Low input voltage level in millivolts. Flash is not fired if chip
+      estimates that system voltage could drop below this level due to flash
+      power consumption.
+      Valid values: 2400 - 3400, step by 33 (rounded down)
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 2400
+    maximum: 3400
+    default: 2400
+
+patternProperties:
+  "^([a-z]+-)?led[01]?$":
+    type: object
+    $ref: common.yaml#
+    unevaluatedProperties: false
+
+    properties:
+      led-sources:
+        allOf:
+          - minItems: 1
+            maxItems: 2
+            items:
+              minimum: 0
+              maximum: 1
+
+      led-max-microamp:
+        description: |
+          Valid values for a LED connected to one FLED output:
+            15625 - 250000, step by 15625 (rounded down)
+          Valid values for a LED connected to both FLED outputs:
+            15625 - 500000, step by 15625 (rounded down)
+
+      flash-max-microamp:
+        description: |
+          Valid values for a single LED connected to one FLED output
+          (boost mode must be turned off):
+            15625 - 1000000, step by 15625 (rounded down)
+          Valid values for a single LED connected to both FLED outputs:
+            15625 - 1250000, step by 15625 (rounded down)
+          Valid values for two LEDs case:
+            15625 - 625000, step by 15625 (rounded down)
+
+      flash-max-timeout-us:
+        description: |
+          Valid values: 62500 - 1000000, step by 62500 (rounded down)
+        minimum: 62500
+        maximum: 1000000
+
+    required:
+      - flash-max-microamp
+      - flash-max-timeout-us
+      - led-max-microamp
+      - led-sources
+
+required:
+  - compatible
+
+additionalProperties: false
-- 
2.32.0


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

* [PATCH v2 2/4] dt-bindings: power: supply: maxim,max77693: convert to dtschema
  2022-01-11 17:50 [PATCH v2 0/4] leds/power/regulator/mfd: dt-bindings: maxim,max77693: convert to dtschema Krzysztof Kozlowski
  2022-01-11 17:50 ` [PATCH v2 1/4] dt-bindings: leds: " Krzysztof Kozlowski
@ 2022-01-11 17:50 ` Krzysztof Kozlowski
  2022-01-12 11:31   ` Sebastian Reichel
  2022-01-11 17:50 ` [PATCH v2 3/4] regulator: dt-bindings: " Krzysztof Kozlowski
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2022-01-11 17:50 UTC (permalink / raw)
  To: Chanwoo Choi, Krzysztof Kozlowski, Pavel Machek, Rob Herring,
	Lee Jones, Sebastian Reichel, Liam Girdwood, Mark Brown,
	linux-kernel, linux-leds, devicetree, linux-pm
  Cc: Rob Herring

Convert the Charger bindings of Maxim MAX77693 MUIC to DT schema format.
The existing bindings were defined in ../bindings/mfd/max77693.txt.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---
 .../bindings/power/supply/maxim,max77693.yaml | 70 +++++++++++++++++++
 MAINTAINERS                                   |  1 +
 2 files changed, 71 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/power/supply/maxim,max77693.yaml

diff --git a/Documentation/devicetree/bindings/power/supply/maxim,max77693.yaml b/Documentation/devicetree/bindings/power/supply/maxim,max77693.yaml
new file mode 100644
index 000000000000..a21dc1a8890f
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/maxim,max77693.yaml
@@ -0,0 +1,70 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/supply/maxim,max77693.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim MAX77693 MicroUSB and Companion Power Management IC Charger
+
+maintainers:
+  - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
+
+description: |
+  This is a part of device tree bindings for Maxim MAX77693 MicroUSB Integrated
+  Circuit (MUIC).
+
+  See also Documentation/devicetree/bindings/mfd/maxim,max77693.yaml for
+  additional information and example.
+
+properties:
+  compatible:
+    const: maxim,max77693-charger
+
+  maxim,constant-microvolt:
+    description: |
+      Battery constant voltage in uV. The charger will operate in fast
+      charge constant current mode till battery voltage reaches this level.
+      Then the charger will switch to fast charge constant voltage mode.
+      Also vsys (system voltage) will be set to this value when DC power is
+      supplied but charger is not enabled.
+      Valid values: 3650000 - 4400000, step by 25000 (rounded down)
+    minimum: 3650000
+    maximum: 4400000
+    default: 4200000
+
+  maxim,min-system-microvolt:
+    description: |
+      Minimal system voltage in uV.
+    enum: [3000000, 3100000, 3200000, 3300000, 3400000, 3500000,
+           3600000, 3700000]
+    default: 3600000
+
+  maxim,thermal-regulation-celsius:
+    description: |
+      Temperature in Celsius for entering high temperature charging mode.
+      If die temperature exceeds this value the charging current will be
+      reduced by 105 mA/Celsius.
+    enum: [70, 85, 100, 115]
+    default: 100
+
+  maxim,battery-overcurrent-microamp:
+    description: |
+      Overcurrent protection threshold in uA (current from battery to
+      system).
+      Valid values: 2000000 - 3500000, step by 250000 (rounded down)
+    minimum: 2000000
+    maximum: 3500000
+    default: 3500000
+
+  maxim,charge-input-threshold-microvolt:
+    description: |
+      Threshold voltage in uV for triggering input voltage regulation loop.
+      If input voltage decreases below this value, the input current will
+      be reduced to reach the threshold voltage.
+    enum: [4300000, 4700000, 4800000, 4900000]
+    default: 4300000
+
+required:
+  - compatible
+
+additionalProperties: false
diff --git a/MAINTAINERS b/MAINTAINERS
index b5e4f14f6768..ead08768fb78 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11681,6 +11681,7 @@ M:	Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
 M:	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
 L:	linux-pm@vger.kernel.org
 S:	Supported
+F:	Documentation/devicetree/bindings/power/supply/maxim,max77693.yaml
 F:	drivers/power/supply/max14577_charger.c
 F:	drivers/power/supply/max77693_charger.c
 
-- 
2.32.0


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

* [PATCH v2 3/4] regulator: dt-bindings: maxim,max77693: convert to dtschema
  2022-01-11 17:50 [PATCH v2 0/4] leds/power/regulator/mfd: dt-bindings: maxim,max77693: convert to dtschema Krzysztof Kozlowski
  2022-01-11 17:50 ` [PATCH v2 1/4] dt-bindings: leds: " Krzysztof Kozlowski
  2022-01-11 17:50 ` [PATCH v2 2/4] dt-bindings: power: supply: " Krzysztof Kozlowski
@ 2022-01-11 17:50 ` Krzysztof Kozlowski
  2022-01-11 22:30   ` Rob Herring
  2022-02-14 16:41   ` Mark Brown
  2022-01-11 17:50 ` [PATCH v2 4/4] dt-bindings: mfd: " Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  5 siblings, 2 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2022-01-11 17:50 UTC (permalink / raw)
  To: Chanwoo Choi, Krzysztof Kozlowski, Pavel Machek, Rob Herring,
	Lee Jones, Sebastian Reichel, Liam Girdwood, Mark Brown,
	linux-kernel, linux-leds, devicetree, linux-pm

Convert the regulator bindings of Maxim MAX77693 MUIC to DT schema format.
The existing bindings were defined in ../bindings/mfd/max77693.txt.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
 .../bindings/regulator/maxim,max77693.yaml    | 60 +++++++++++++++++++
 1 file changed, 60 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/maxim,max77693.yaml

diff --git a/Documentation/devicetree/bindings/regulator/maxim,max77693.yaml b/Documentation/devicetree/bindings/regulator/maxim,max77693.yaml
new file mode 100644
index 000000000000..20d8559bdc2b
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/maxim,max77693.yaml
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/maxim,max77693.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim MAX77693 MicroUSB and Companion Power Management IC regulators
+
+maintainers:
+  - Chanwoo Choi <cw00.choi@samsung.com>
+  - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
+
+description: |
+  This is a part of device tree bindings for Maxim MAX77693 MicroUSB Integrated
+  Circuit (MUIC).
+
+  See also Documentation/devicetree/bindings/mfd/maxim,max77693.yaml for
+  additional information and example.
+
+properties:
+  CHARGER:
+    type: object
+    $ref: regulator.yaml#
+    additionalProperties: false
+    description: |
+      Current regulator.
+
+    properties:
+      regulator-name: true
+      regulator-always-on: true
+      regulator-boot-on: true
+      regulator-min-microamp:
+        minimum: 60000
+      regulator-max-microamp:
+        maximum: 2580000
+
+    required:
+      - regulator-name
+
+patternProperties:
+  "^ESAFEOUT[12]$":
+    type: object
+    $ref: regulator.yaml#
+    additionalProperties: false
+    description: |
+      Safeout LDO regulator.
+
+    properties:
+      regulator-name: true
+      regulator-always-on: true
+      regulator-boot-on: true
+      regulator-min-microvolt:
+        minimum: 3300000
+      regulator-max-microvolt:
+        maximum: 4950000
+
+    required:
+      - regulator-name
+
+additionalProperties: false
-- 
2.32.0


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

* [PATCH v2 4/4] dt-bindings: mfd: maxim,max77693: convert to dtschema
  2022-01-11 17:50 [PATCH v2 0/4] leds/power/regulator/mfd: dt-bindings: maxim,max77693: convert to dtschema Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2022-01-11 17:50 ` [PATCH v2 3/4] regulator: dt-bindings: " Krzysztof Kozlowski
@ 2022-01-11 17:50 ` Krzysztof Kozlowski
  2022-01-12  2:26   ` Rob Herring
  2022-02-06 17:36 ` [PATCH v2 0/4] leds/power/regulator/mfd: dt-bindings: " Krzysztof Kozlowski
  2022-02-14 14:14 ` [GIT PULL] Immutable branch between MFD, LED, Power and Regulator due for the v5.18 merge window Lee Jones
  5 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2022-01-11 17:50 UTC (permalink / raw)
  To: Chanwoo Choi, Krzysztof Kozlowski, Pavel Machek, Rob Herring,
	Lee Jones, Sebastian Reichel, Liam Girdwood, Mark Brown,
	linux-kernel, linux-leds, devicetree, linux-pm

Convert the MFD part of Maxim MAX77693 MUIC to DT schema format.  The
example DTS was copied from existing DTS (exynos4412-midas.dtsi), so
keep the license as GPL-2.0-only.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
 .../devicetree/bindings/mfd/max77693.txt      | 194 ------------------
 .../bindings/mfd/maxim,max77693.yaml          | 143 +++++++++++++
 MAINTAINERS                                   |   2 +-
 3 files changed, 144 insertions(+), 195 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mfd/max77693.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/maxim,max77693.yaml

diff --git a/Documentation/devicetree/bindings/mfd/max77693.txt b/Documentation/devicetree/bindings/mfd/max77693.txt
deleted file mode 100644
index 1032df14498b..000000000000
--- a/Documentation/devicetree/bindings/mfd/max77693.txt
+++ /dev/null
@@ -1,194 +0,0 @@
-Maxim MAX77693 multi-function device
-
-MAX77693 is a Multifunction device with the following submodules:
-- PMIC,
-- CHARGER,
-- LED,
-- MUIC,
-- HAPTIC
-
-It is interfaced to host controller using i2c.
-This document describes the bindings for the mfd device.
-
-Required properties:
-- compatible : Must be "maxim,max77693".
-- reg : Specifies the i2c slave address of PMIC block.
-- interrupts : This i2c device has an IRQ line connected to the main SoC.
-
-Optional properties:
-- regulators : The regulators of max77693 have to be instantiated under subnode
-  named "regulators" using the following format.
-
-	regulators {
-		regulator-compatible = ESAFEOUT1/ESAFEOUT2/CHARGER
-		standard regulator constraints[*].
-	};
-
-	[*] refer Documentation/devicetree/bindings/regulator/regulator.txt
-
-- haptic : The MAX77693 haptic device utilises a PWM controlled motor to provide
-  users with tactile feedback. PWM period and duty-cycle are varied in
-  order to provide the appropriate level of feedback.
-
- Required properties:
-	- compatible : Must be "maxim,max77693-haptic"
-	- haptic-supply : power supply for the haptic motor
-	[*] refer Documentation/devicetree/bindings/regulator/regulator.txt
-	- pwms : phandle to the physical PWM(Pulse Width Modulation) device.
-	 PWM properties should be named "pwms". And number of cell is different
-	 for each pwm device.
-	 To get more information, please refer to documentation.
-	[*] refer Documentation/devicetree/bindings/pwm/pwm.txt
-
-- charger : Node configuring the charger driver.
-  If present, required properties:
-  - compatible : Must be "maxim,max77693-charger".
-
-  Optional properties (if not set, defaults will be used):
-  - maxim,constant-microvolt : Battery constant voltage in uV. The charger
-    will operate in fast charge constant current mode till battery voltage
-    reaches this level. Then the charger will switch to fast charge constant
-    voltage mode. Also vsys (system voltage) will be set to this value when
-    DC power is supplied but charger is not enabled.
-    Valid values: 3650000 - 4400000, step by 25000 (rounded down)
-    Default: 4200000
-
-  - maxim,min-system-microvolt : Minimal system voltage in uV.
-    Valid values: 3000000 - 3700000, step by 100000 (rounded down)
-    Default: 3600000
-
-  - maxim,thermal-regulation-celsius : Temperature in Celsius for entering
-    high temperature charging mode. If die temperature exceeds this value
-    the charging current will be reduced by 105 mA/Celsius.
-    Valid values: 70, 85, 100, 115
-    Default: 100
-
-  - maxim,battery-overcurrent-microamp : Overcurrent protection threshold
-    in uA (current from battery to system).
-    Valid values: 2000000 - 3500000, step by 250000 (rounded down)
-    Default: 3500000
-
-  - maxim,charge-input-threshold-microvolt : Threshold voltage in uV for
-    triggering input voltage regulation loop. If input voltage decreases
-    below this value, the input current will be reduced to reach the
-    threshold voltage.
-    Valid values: 4300000, 4700000, 4800000, 4900000
-    Default: 4300000
-
-- led : the LED submodule device node
-
-There are two LED outputs available - FLED1 and FLED2. Each of them can
-control a separate LED or they can be connected together to double
-the maximum current for a single connected LED. One LED is represented
-by one child node.
-
-Required properties:
-- compatible : Must be "maxim,max77693-led".
-
-Optional properties:
-- maxim,boost-mode :
-	In boost mode the device can produce up to 1.2A of total current
-	on both outputs. The maximum current on each output is reduced
-	to 625mA then. If not enabled explicitly, boost setting defaults to
-	LEDS_BOOST_FIXED in case both current sources are used.
-	Possible values:
-		LEDS_BOOST_OFF (0) - no boost,
-		LEDS_BOOST_ADAPTIVE (1) - adaptive mode,
-		LEDS_BOOST_FIXED (2) - fixed mode.
-- maxim,boost-mvout : Output voltage of the boost module in millivolts.
-	Valid values: 3300 - 5500, step by 25 (rounded down)
-	Default: 3300
-- maxim,mvsys-min : Low input voltage level in millivolts. Flash is not fired
-	if chip estimates that system voltage could drop below this level due
-	to flash power consumption.
-	Valid values: 2400 - 3400, step by 33 (rounded down)
-	Default: 2400
-
-Required properties for the LED child node:
-- led-sources : see Documentation/devicetree/bindings/leds/common.txt;
-		device current output identifiers: 0 - FLED1, 1 - FLED2
-- led-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
-	Valid values for a LED connected to one FLED output:
-		15625 - 250000, step by 15625 (rounded down)
-	Valid values for a LED connected to both FLED outputs:
-		15625 - 500000, step by 15625 (rounded down)
-- flash-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
-	Valid values for a single LED connected to one FLED output
-	(boost mode must be turned off):
-		15625 - 1000000, step by 15625 (rounded down)
-	Valid values for a single LED connected to both FLED outputs:
-		15625 - 1250000, step by 15625 (rounded down)
-	Valid values for two LEDs case:
-		15625 - 625000, step by 15625 (rounded down)
-- flash-max-timeout-us : see Documentation/devicetree/bindings/leds/common.txt
-	Valid values: 62500 - 1000000, step by 62500 (rounded down)
-
-Optional properties for the LED child node:
-- label : see Documentation/devicetree/bindings/leds/common.txt
-
-Optional nodes:
-- max77693-muic :
-	Node used only by extcon consumers.
-	Required properties:
-		- compatible : "maxim,max77693-muic"
-
-Example:
-#include <dt-bindings/leds/common.h>
-
-	max77693@66 {
-		compatible = "maxim,max77693";
-		reg = <0x66>;
-		interrupt-parent = <&gpx1>;
-		interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
-
-		regulators {
-			esafeout@1 {
-				regulator-compatible = "ESAFEOUT1";
-				regulator-name = "ESAFEOUT1";
-				regulator-boot-on;
-			};
-			esafeout@2 {
-				regulator-compatible = "ESAFEOUT2";
-				regulator-name = "ESAFEOUT2";
-				};
-			charger@0 {
-				regulator-compatible = "CHARGER";
-				regulator-name = "CHARGER";
-				regulator-min-microamp = <60000>;
-				regulator-max-microamp = <2580000>;
-					regulator-boot-on;
-			};
-		};
-
-		haptic {
-			compatible = "maxim,max77693-haptic";
-			haptic-supply = <&haptic_supply>;
-			pwms = <&pwm 0 40000 0>;
-			pwm-names = "haptic";
-		};
-
-		charger {
-			compatible = "maxim,max77693-charger";
-
-			maxim,constant-microvolt = <4200000>;
-			maxim,min-system-microvolt = <3600000>;
-			maxim,thermal-regulation-celsius = <75>;
-			maxim,battery-overcurrent-microamp = <3000000>;
-			maxim,charge-input-threshold-microvolt = <4300000>;
-		};
-
-		led {
-			compatible = "maxim,max77693-led";
-			maxim,boost-mode = <LEDS_BOOST_FIXED>;
-			maxim,boost-mvout = <5000>;
-			maxim,mvsys-min = <2400>;
-
-			camera_flash: flash-led {
-				label = "max77693-flash";
-				led-sources = <0>, <1>;
-				led-max-microamp = <500000>;
-				flash-max-microamp = <1250000>;
-				flash-max-timeout-us = <1000000>;
-			};
-		};
-	};
diff --git a/Documentation/devicetree/bindings/mfd/maxim,max77693.yaml b/Documentation/devicetree/bindings/mfd/maxim,max77693.yaml
new file mode 100644
index 000000000000..906101197e11
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/maxim,max77693.yaml
@@ -0,0 +1,143 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/maxim,max77693.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim MAX77693 MicroUSB and Companion Power Management IC
+
+maintainers:
+  - Chanwoo Choi <cw00.choi@samsung.com>
+  - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
+
+description: |
+  This is a part of device tree bindings for Maxim MAX77693 MicroUSB
+  Integrated Circuit (MUIC).
+
+  The Maxim MAX77693 is a MicroUSB and Companion Power Management IC which
+  includes voltage current regulators, charger, LED/flash, haptic motor driver
+  and MicroUSB management IC.
+
+properties:
+  compatible:
+    const: maxim,max77693
+
+  interrupts:
+    maxItems: 1
+
+  reg:
+    maxItems: 1
+
+  charger:
+    $ref: /schemas/power/supply/maxim,max77693.yaml
+
+  led:
+    $ref: /schemas/leds/maxim,max77693.yaml
+
+  max77693-muic:
+    type: object
+    additionalProperties: false
+
+    properties:
+      compatible:
+        const: maxim,max77693-muic
+
+    required:
+      - compatible
+
+  motor-driver:
+    type: object
+    additionalProperties: false
+
+    properties:
+      compatible:
+        const: maxim,max77693-haptic
+
+      haptic-supply:
+        description: Power supply to the haptic motor
+
+      pwms:
+        maxItems: 1
+
+    required:
+      - compatible
+      - haptic-supply
+      - pwms
+
+  regulators:
+    $ref: ../regulator/maxim,max77693.yaml
+    description:
+      List of child nodes that specify the regulators.
+
+required:
+  - compatible
+  - interrupts
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/leds/common.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        pmic@66 {
+            compatible = "maxim,max77693";
+            reg = <0x66>;
+            interrupt-parent = <&gpx1>;
+            interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
+
+            regulators {
+                ESAFEOUT1 {
+                    regulator-name = "ESAFEOUT1";
+                };
+
+                ESAFEOUT2 {
+                    regulator-name = "ESAFEOUT2";
+                };
+
+                CHARGER {
+                    regulator-name = "CHARGER";
+                    regulator-min-microamp = <60000>;
+                    regulator-max-microamp = <2580000>;
+                };
+            };
+
+            motor-driver {
+                compatible = "maxim,max77693-haptic";
+                haptic-supply = <&ldo26_reg>;
+                pwms = <&pwm 0 38022 0>;
+            };
+
+            charger {
+                compatible = "maxim,max77693-charger";
+
+                maxim,constant-microvolt = <4350000>;
+                maxim,min-system-microvolt = <3600000>;
+                maxim,thermal-regulation-celsius = <100>;
+                maxim,battery-overcurrent-microamp = <3500000>;
+                maxim,charge-input-threshold-microvolt = <4300000>;
+            };
+
+            led {
+                compatible = "maxim,max77693-led";
+                maxim,boost-mode = <LEDS_BOOST_FIXED>;
+                maxim,boost-mvout = <5000>;
+                maxim,mvsys-min = <2400>;
+
+                flash-led {
+                    label = "max77693-flash";
+                    function = LED_FUNCTION_FLASH;
+                    color = <LED_COLOR_ID_WHITE>;
+                    led-sources = <0>, <1>;
+                    led-max-microamp = <500000>;
+                    flash-max-microamp = <1250000>;
+                    flash-max-timeout-us = <1000000>;
+                };
+            };
+        };
+    };
diff --git a/MAINTAINERS b/MAINTAINERS
index ead08768fb78..e5f2758531bc 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11692,9 +11692,9 @@ M:	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
 L:	linux-kernel@vger.kernel.org
 S:	Supported
 F:	Documentation/devicetree/bindings/*/maxim,max77686.yaml
+F:	Documentation/devicetree/bindings/*/maxim,max77693.yaml
 F:	Documentation/devicetree/bindings/clock/maxim,max77686.txt
 F:	Documentation/devicetree/bindings/mfd/max14577.txt
-F:	Documentation/devicetree/bindings/mfd/max77693.txt
 F:	drivers/*/max14577*.c
 F:	drivers/*/max77686*.c
 F:	drivers/*/max77693*.c
-- 
2.32.0


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

* Re: [PATCH v2 1/4] dt-bindings: leds: maxim,max77693: convert to dtschema
  2022-01-11 17:50 ` [PATCH v2 1/4] dt-bindings: leds: " Krzysztof Kozlowski
@ 2022-01-11 22:29   ` Rob Herring
  0 siblings, 0 replies; 18+ messages in thread
From: Rob Herring @ 2022-01-11 22:29 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Pavel Machek, Sebastian Reichel, Mark Brown, linux-leds,
	Rob Herring, Chanwoo Choi, linux-pm, devicetree, linux-kernel,
	Liam Girdwood, Lee Jones

On Tue, 11 Jan 2022 18:50:14 +0100, Krzysztof Kozlowski wrote:
> Convert the LEDs bindings of Maxim MAX77693 MUIC to DT schema format.
> The existing bindings were defined in ../bindings/mfd/max77693.txt.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> ---
>  .../bindings/leds/maxim,max77693.yaml         | 105 ++++++++++++++++++
>  1 file changed, 105 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/leds/maxim,max77693.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 3/4] regulator: dt-bindings: maxim,max77693: convert to dtschema
  2022-01-11 17:50 ` [PATCH v2 3/4] regulator: dt-bindings: " Krzysztof Kozlowski
@ 2022-01-11 22:30   ` Rob Herring
  2022-02-14 16:41   ` Mark Brown
  1 sibling, 0 replies; 18+ messages in thread
From: Rob Herring @ 2022-01-11 22:30 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Liam Girdwood, Chanwoo Choi, devicetree, linux-leds, Lee Jones,
	Mark Brown, Sebastian Reichel, Pavel Machek, linux-pm,
	linux-kernel, Rob Herring

On Tue, 11 Jan 2022 18:50:16 +0100, Krzysztof Kozlowski wrote:
> Convert the regulator bindings of Maxim MAX77693 MUIC to DT schema format.
> The existing bindings were defined in ../bindings/mfd/max77693.txt.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> ---
>  .../bindings/regulator/maxim,max77693.yaml    | 60 +++++++++++++++++++
>  1 file changed, 60 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/regulator/maxim,max77693.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 4/4] dt-bindings: mfd: maxim,max77693: convert to dtschema
  2022-01-11 17:50 ` [PATCH v2 4/4] dt-bindings: mfd: " Krzysztof Kozlowski
@ 2022-01-12  2:26   ` Rob Herring
  0 siblings, 0 replies; 18+ messages in thread
From: Rob Herring @ 2022-01-12  2:26 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, Chanwoo Choi, linux-kernel, Sebastian Reichel,
	linux-leds, Liam Girdwood, Lee Jones, Mark Brown, Pavel Machek,
	linux-pm, devicetree

On Tue, 11 Jan 2022 18:50:17 +0100, Krzysztof Kozlowski wrote:
> Convert the MFD part of Maxim MAX77693 MUIC to DT schema format.  The
> example DTS was copied from existing DTS (exynos4412-midas.dtsi), so
> keep the license as GPL-2.0-only.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> ---
>  .../devicetree/bindings/mfd/max77693.txt      | 194 ------------------
>  .../bindings/mfd/maxim,max77693.yaml          | 143 +++++++++++++
>  MAINTAINERS                                   |   2 +-
>  3 files changed, 144 insertions(+), 195 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/mfd/max77693.txt
>  create mode 100644 Documentation/devicetree/bindings/mfd/maxim,max77693.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 2/4] dt-bindings: power: supply: maxim,max77693: convert to dtschema
  2022-01-11 17:50 ` [PATCH v2 2/4] dt-bindings: power: supply: " Krzysztof Kozlowski
@ 2022-01-12 11:31   ` Sebastian Reichel
  0 siblings, 0 replies; 18+ messages in thread
From: Sebastian Reichel @ 2022-01-12 11:31 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Chanwoo Choi, Pavel Machek, Rob Herring, Lee Jones,
	Liam Girdwood, Mark Brown, linux-kernel, linux-leds, devicetree,
	linux-pm, Rob Herring

[-- Attachment #1: Type: text/plain, Size: 4164 bytes --]

Hi,

On Tue, Jan 11, 2022 at 06:50:15PM +0100, Krzysztof Kozlowski wrote:
> Convert the Charger bindings of Maxim MAX77693 MUIC to DT schema format.
> The existing bindings were defined in ../bindings/mfd/max77693.txt.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> Reviewed-by: Rob Herring <robh@kernel.org>
> ---

I expect this to go through Rob's or Lee's tree:

Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>

-- Sebastian

>  .../bindings/power/supply/maxim,max77693.yaml | 70 +++++++++++++++++++
>  MAINTAINERS                                   |  1 +
>  2 files changed, 71 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/power/supply/maxim,max77693.yaml
> 
> diff --git a/Documentation/devicetree/bindings/power/supply/maxim,max77693.yaml b/Documentation/devicetree/bindings/power/supply/maxim,max77693.yaml
> new file mode 100644
> index 000000000000..a21dc1a8890f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/supply/maxim,max77693.yaml
> @@ -0,0 +1,70 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/power/supply/maxim,max77693.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Maxim MAX77693 MicroUSB and Companion Power Management IC Charger
> +
> +maintainers:
> +  - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> +
> +description: |
> +  This is a part of device tree bindings for Maxim MAX77693 MicroUSB Integrated
> +  Circuit (MUIC).
> +
> +  See also Documentation/devicetree/bindings/mfd/maxim,max77693.yaml for
> +  additional information and example.
> +
> +properties:
> +  compatible:
> +    const: maxim,max77693-charger
> +
> +  maxim,constant-microvolt:
> +    description: |
> +      Battery constant voltage in uV. The charger will operate in fast
> +      charge constant current mode till battery voltage reaches this level.
> +      Then the charger will switch to fast charge constant voltage mode.
> +      Also vsys (system voltage) will be set to this value when DC power is
> +      supplied but charger is not enabled.
> +      Valid values: 3650000 - 4400000, step by 25000 (rounded down)
> +    minimum: 3650000
> +    maximum: 4400000
> +    default: 4200000
> +
> +  maxim,min-system-microvolt:
> +    description: |
> +      Minimal system voltage in uV.
> +    enum: [3000000, 3100000, 3200000, 3300000, 3400000, 3500000,
> +           3600000, 3700000]
> +    default: 3600000
> +
> +  maxim,thermal-regulation-celsius:
> +    description: |
> +      Temperature in Celsius for entering high temperature charging mode.
> +      If die temperature exceeds this value the charging current will be
> +      reduced by 105 mA/Celsius.
> +    enum: [70, 85, 100, 115]
> +    default: 100
> +
> +  maxim,battery-overcurrent-microamp:
> +    description: |
> +      Overcurrent protection threshold in uA (current from battery to
> +      system).
> +      Valid values: 2000000 - 3500000, step by 250000 (rounded down)
> +    minimum: 2000000
> +    maximum: 3500000
> +    default: 3500000
> +
> +  maxim,charge-input-threshold-microvolt:
> +    description: |
> +      Threshold voltage in uV for triggering input voltage regulation loop.
> +      If input voltage decreases below this value, the input current will
> +      be reduced to reach the threshold voltage.
> +    enum: [4300000, 4700000, 4800000, 4900000]
> +    default: 4300000
> +
> +required:
> +  - compatible
> +
> +additionalProperties: false
> diff --git a/MAINTAINERS b/MAINTAINERS
> index b5e4f14f6768..ead08768fb78 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -11681,6 +11681,7 @@ M:	Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
>  M:	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
>  L:	linux-pm@vger.kernel.org
>  S:	Supported
> +F:	Documentation/devicetree/bindings/power/supply/maxim,max77693.yaml
>  F:	drivers/power/supply/max14577_charger.c
>  F:	drivers/power/supply/max77693_charger.c
>  
> -- 
> 2.32.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH v2 0/4] leds/power/regulator/mfd: dt-bindings: maxim,max77693: convert to dtschema
  2022-01-11 17:50 [PATCH v2 0/4] leds/power/regulator/mfd: dt-bindings: maxim,max77693: convert to dtschema Krzysztof Kozlowski
                   ` (3 preceding siblings ...)
  2022-01-11 17:50 ` [PATCH v2 4/4] dt-bindings: mfd: " Krzysztof Kozlowski
@ 2022-02-06 17:36 ` Krzysztof Kozlowski
  2022-02-07  9:35   ` Lee Jones
  2022-02-14 14:14 ` [GIT PULL] Immutable branch between MFD, LED, Power and Regulator due for the v5.18 merge window Lee Jones
  5 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2022-02-06 17:36 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Lee Jones
  Cc: linux-kernel, Sebastian Reichel, Pavel Machek, Chanwoo Choi,
	Mark Brown, Liam Girdwood, linux-leds, devicetree, linux-pm,
	Rob Herring

On 11/01/2022 18:50, Krzysztof Kozlowski wrote:
> Hi,
> 
> Changes since v1
> ================
> 1. MFD: Use absolute path to schemas, add additionalProperties=false.
> 2. Regulator: mention all allowed properties,
>    additionalProperties=false, add min/max values for voltages and
>    current, don't use patternProperties when not needed.
> 
> Dependencies
> ============
> The final patch - MFD maxim,max77693 bindings conversion - depends on
> all previous. Therefore this could go via Rob's or Lee's trees.
> 

Dear Lee,

This patchset was reviewed and there are no outstanding issues. Could
you pick up entire set via MFD tree?

Best regards,
Krzysztof

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

* Re: [PATCH v2 0/4] leds/power/regulator/mfd: dt-bindings: maxim,max77693: convert to dtschema
  2022-02-06 17:36 ` [PATCH v2 0/4] leds/power/regulator/mfd: dt-bindings: " Krzysztof Kozlowski
@ 2022-02-07  9:35   ` Lee Jones
  0 siblings, 0 replies; 18+ messages in thread
From: Lee Jones @ 2022-02-07  9:35 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: linux-kernel, Sebastian Reichel, Pavel Machek, Chanwoo Choi,
	Mark Brown, Liam Girdwood, linux-leds, devicetree, linux-pm,
	Rob Herring

On Sun, 06 Feb 2022, Krzysztof Kozlowski wrote:

> On 11/01/2022 18:50, Krzysztof Kozlowski wrote:
> > Hi,
> > 
> > Changes since v1
> > ================
> > 1. MFD: Use absolute path to schemas, add additionalProperties=false.
> > 2. Regulator: mention all allowed properties,
> >    additionalProperties=false, add min/max values for voltages and
> >    current, don't use patternProperties when not needed.
> > 
> > Dependencies
> > ============
> > The final patch - MFD maxim,max77693 bindings conversion - depends on
> > all previous. Therefore this could go via Rob's or Lee's trees.
> > 
> 
> Dear Lee,
> 
> This patchset was reviewed and there are no outstanding issues. Could
> you pick up entire set via MFD tree?

Nothing from LED or Regulator?

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* [GIT PULL] Immutable branch between MFD, LED, Power and Regulator due for the v5.18 merge window
  2022-01-11 17:50 [PATCH v2 0/4] leds/power/regulator/mfd: dt-bindings: maxim,max77693: convert to dtschema Krzysztof Kozlowski
                   ` (4 preceding siblings ...)
  2022-02-06 17:36 ` [PATCH v2 0/4] leds/power/regulator/mfd: dt-bindings: " Krzysztof Kozlowski
@ 2022-02-14 14:14 ` Lee Jones
  5 siblings, 0 replies; 18+ messages in thread
From: Lee Jones @ 2022-02-14 14:14 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Chanwoo Choi, Pavel Machek, Rob Herring, Sebastian Reichel,
	Liam Girdwood, Mark Brown, linux-kernel, linux-leds, devicetree,
	linux-pm

Enjoy!

The following changes since commit e783362eb54cd99b2cac8b3a9aeac942e6f6ac07:

  Linux 5.17-rc1 (2022-01-23 10:12:53 +0200)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/ib-mfd-led-power-regulator-v5.18

for you to fetch changes up to b38213c6118b6b3fe163bd9acb7f723c379dd833:

  dt-bindings: mfd: maxim,max77693: Convert to dtschema (2022-02-14 13:53:01 +0000)

----------------------------------------------------------------
Immutable branch between MFD, LED, Power and Regulator due for the v5.18 merge window

----------------------------------------------------------------
Krzysztof Kozlowski (4):
      dt-bindings: leds: maxim,max77693: Convert to dtschema
      dt-bindings: power: supply: maxim,max77693: Convert to dtschema
      regulator: dt-bindings: maxim,max77693: Convert to dtschema
      dt-bindings: mfd: maxim,max77693: Convert to dtschema

 .../devicetree/bindings/leds/maxim,max77693.yaml   | 105 +++++++++++
 Documentation/devicetree/bindings/mfd/max77693.txt | 194 ---------------------
 .../devicetree/bindings/mfd/maxim,max77693.yaml    | 143 +++++++++++++++
 .../bindings/power/supply/maxim,max77693.yaml      |  70 ++++++++
 .../bindings/regulator/maxim,max77693.yaml         |  60 +++++++
 MAINTAINERS                                        |   3 +-
 6 files changed, 380 insertions(+), 195 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/leds/maxim,max77693.yaml
 delete mode 100644 Documentation/devicetree/bindings/mfd/max77693.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/maxim,max77693.yaml
 create mode 100644 Documentation/devicetree/bindings/power/supply/maxim,max77693.yaml
 create mode 100644 Documentation/devicetree/bindings/regulator/maxim,max77693.yaml

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH v2 3/4] regulator: dt-bindings: maxim,max77693: convert to dtschema
  2022-01-11 17:50 ` [PATCH v2 3/4] regulator: dt-bindings: " Krzysztof Kozlowski
  2022-01-11 22:30   ` Rob Herring
@ 2022-02-14 16:41   ` Mark Brown
  2022-02-14 16:45     ` Krzysztof Kozlowski
  1 sibling, 1 reply; 18+ messages in thread
From: Mark Brown @ 2022-02-14 16:41 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Chanwoo Choi, Pavel Machek, Rob Herring, Lee Jones,
	Sebastian Reichel, Liam Girdwood, linux-kernel, linux-leds,
	devicetree, linux-pm

[-- Attachment #1: Type: text/plain, Size: 262 bytes --]

On Tue, Jan 11, 2022 at 06:50:16PM +0100, Krzysztof Kozlowski wrote:

> +    properties:
> +      regulator-name: true
> +      regulator-always-on: true
> +      regulator-boot-on: true

Why are these specific generic regulator properties enumerated?  

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v2 3/4] regulator: dt-bindings: maxim,max77693: convert to dtschema
  2022-02-14 16:41   ` Mark Brown
@ 2022-02-14 16:45     ` Krzysztof Kozlowski
  2022-02-14 16:51       ` Mark Brown
  0 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2022-02-14 16:45 UTC (permalink / raw)
  To: Mark Brown
  Cc: Chanwoo Choi, Pavel Machek, Rob Herring, Lee Jones,
	Sebastian Reichel, Liam Girdwood, linux-kernel, linux-leds,
	devicetree, linux-pm

On 14/02/2022 17:41, Mark Brown wrote:
> On Tue, Jan 11, 2022 at 06:50:16PM +0100, Krzysztof Kozlowski wrote:
> 
>> +    properties:
>> +      regulator-name: true
>> +      regulator-always-on: true
>> +      regulator-boot-on: true
> 
> Why are these specific generic regulator properties enumerated?  

additionalProperties=false is used, so all properties, also ones from
regulator.yaml, have to be mentioned.

Why this approach was used? Because the hardware here is very limited,
so no other properties are expected. No other features are supported.


Best regards,
Krzysztof

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

* Re: [PATCH v2 3/4] regulator: dt-bindings: maxim,max77693: convert to dtschema
  2022-02-14 16:45     ` Krzysztof Kozlowski
@ 2022-02-14 16:51       ` Mark Brown
  2022-02-14 17:01         ` Krzysztof Kozlowski
  0 siblings, 1 reply; 18+ messages in thread
From: Mark Brown @ 2022-02-14 16:51 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Chanwoo Choi, Pavel Machek, Rob Herring, Lee Jones,
	Sebastian Reichel, Liam Girdwood, linux-kernel, linux-leds,
	devicetree, linux-pm

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

On Mon, Feb 14, 2022 at 05:45:40PM +0100, Krzysztof Kozlowski wrote:
> On 14/02/2022 17:41, Mark Brown wrote:
> >> +    properties:
> >> +      regulator-name: true
> >> +      regulator-always-on: true
> >> +      regulator-boot-on: true

> > Why are these specific generic regulator properties enumerated?  

> additionalProperties=false is used, so all properties, also ones from
> regulator.yaml, have to be mentioned.

> Why this approach was used? Because the hardware here is very limited,
> so no other properties are expected. No other features are supported.

That's not going to scale well if we add any new features in the core,
and doesn't include things like coupling which could be applied to any
regulator.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v2 3/4] regulator: dt-bindings: maxim,max77693: convert to dtschema
  2022-02-14 16:51       ` Mark Brown
@ 2022-02-14 17:01         ` Krzysztof Kozlowski
  2022-02-14 17:07           ` Mark Brown
  0 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2022-02-14 17:01 UTC (permalink / raw)
  To: Mark Brown
  Cc: Chanwoo Choi, Pavel Machek, Rob Herring, Lee Jones,
	Sebastian Reichel, Liam Girdwood, linux-kernel, linux-leds,
	devicetree, linux-pm

On 14/02/2022 17:51, Mark Brown wrote:
> On Mon, Feb 14, 2022 at 05:45:40PM +0100, Krzysztof Kozlowski wrote:
>> On 14/02/2022 17:41, Mark Brown wrote:
>>>> +    properties:
>>>> +      regulator-name: true
>>>> +      regulator-always-on: true
>>>> +      regulator-boot-on: true
> 
>>> Why are these specific generic regulator properties enumerated?  
> 
>> additionalProperties=false is used, so all properties, also ones from
>> regulator.yaml, have to be mentioned.
> 
>> Why this approach was used? Because the hardware here is very limited,
>> so no other properties are expected. No other features are supported.
> 
> That's not going to scale well if we add any new features in the core,
> and doesn't include things like coupling which could be applied to any
> regulator.

Relaxing constraints - removing required nodes and using
uneavluatedProperties=false - is still possible. Unlike the other way if
we ever wanted to restrict too flexible bindings.

You mantioned new features - this approach does not change that. If you
add new properties to common schema, you already alter bindings. Just
because we use common part, it does not change the fact that it is a
bindings change. Adding new features in common schema is the same
binding change as adding new feature in the specific binding, except
more work.

I guess you though that work in scaling, so yes, this scales worse. The
benefit is that this really restricts usage of regulator to what is
supported, so allows to detect wrongly configured DTS.

Once coupling (or any other feature) is supported, each of such
restricted regulator bindings should be independently revised, instead
of adding this new feature to everything.

Best regards,
Krzysztof

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

* Re: [PATCH v2 3/4] regulator: dt-bindings: maxim,max77693: convert to dtschema
  2022-02-14 17:01         ` Krzysztof Kozlowski
@ 2022-02-14 17:07           ` Mark Brown
  2022-02-14 17:28             ` Krzysztof Kozlowski
  0 siblings, 1 reply; 18+ messages in thread
From: Mark Brown @ 2022-02-14 17:07 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Chanwoo Choi, Pavel Machek, Rob Herring, Lee Jones,
	Sebastian Reichel, Liam Girdwood, linux-kernel, linux-leds,
	devicetree, linux-pm

[-- Attachment #1: Type: text/plain, Size: 1379 bytes --]

On Mon, Feb 14, 2022 at 06:01:17PM +0100, Krzysztof Kozlowski wrote:

> You mantioned new features - this approach does not change that. If you
> add new properties to common schema, you already alter bindings. Just
> because we use common part, it does not change the fact that it is a
> bindings change. Adding new features in common schema is the same
> binding change as adding new feature in the specific binding, except
> more work.

> I guess you though that work in scaling, so yes, this scales worse. The
> benefit is that this really restricts usage of regulator to what is
> supported, so allows to detect wrongly configured DTS.

We should have a way of specifying generic properties that doesn't
require us to go through every single user of a binding and updating
them all, then auditing by hand any new users to make sure they didn't
forget one of the generic properties.  This is just error prone and
miserable, especially when most of the checking is done by hand rather
than automated.

> Once coupling (or any other feature) is supported, each of such
> restricted regulator bindings should be independently revised, instead
> of adding this new feature to everything.

Coupling is already supported - it doesn't require anything on the part
of the driver, it's about defining the relationships between supplies
rather than anything the driver or device does.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v2 3/4] regulator: dt-bindings: maxim,max77693: convert to dtschema
  2022-02-14 17:07           ` Mark Brown
@ 2022-02-14 17:28             ` Krzysztof Kozlowski
  0 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2022-02-14 17:28 UTC (permalink / raw)
  To: Mark Brown
  Cc: Chanwoo Choi, Pavel Machek, Rob Herring, Lee Jones,
	Sebastian Reichel, Liam Girdwood, linux-kernel, linux-leds,
	devicetree, linux-pm

On 14/02/2022 18:07, Mark Brown wrote:
> On Mon, Feb 14, 2022 at 06:01:17PM +0100, Krzysztof Kozlowski wrote:
> 
>> You mantioned new features - this approach does not change that. If you
>> add new properties to common schema, you already alter bindings. Just
>> because we use common part, it does not change the fact that it is a
>> bindings change. Adding new features in common schema is the same
>> binding change as adding new feature in the specific binding, except
>> more work.
> 
>> I guess you though that work in scaling, so yes, this scales worse. The
>> benefit is that this really restricts usage of regulator to what is
>> supported, so allows to detect wrongly configured DTS.
> 
> We should have a way of specifying generic properties that doesn't
> require us to go through every single user of a binding and updating
> them all, then auditing by hand any new users to make sure they didn't
> forget one of the generic properties.  This is just error prone and
> miserable, especially when most of the checking is done by hand rather
> than automated.

I see. The hardware really does not support most of core regulator
features, so if we switch to your proposal
(unevaluatedProperties:false), the DTS could contain something which is
good from the core regulator point of view, but does not fit at all this
hardware.

A disallow/deny-list could solve it... but it also does not scale.

Best regards,
Krzysztof

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

end of thread, other threads:[~2022-02-14 17:28 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-11 17:50 [PATCH v2 0/4] leds/power/regulator/mfd: dt-bindings: maxim,max77693: convert to dtschema Krzysztof Kozlowski
2022-01-11 17:50 ` [PATCH v2 1/4] dt-bindings: leds: " Krzysztof Kozlowski
2022-01-11 22:29   ` Rob Herring
2022-01-11 17:50 ` [PATCH v2 2/4] dt-bindings: power: supply: " Krzysztof Kozlowski
2022-01-12 11:31   ` Sebastian Reichel
2022-01-11 17:50 ` [PATCH v2 3/4] regulator: dt-bindings: " Krzysztof Kozlowski
2022-01-11 22:30   ` Rob Herring
2022-02-14 16:41   ` Mark Brown
2022-02-14 16:45     ` Krzysztof Kozlowski
2022-02-14 16:51       ` Mark Brown
2022-02-14 17:01         ` Krzysztof Kozlowski
2022-02-14 17:07           ` Mark Brown
2022-02-14 17:28             ` Krzysztof Kozlowski
2022-01-11 17:50 ` [PATCH v2 4/4] dt-bindings: mfd: " Krzysztof Kozlowski
2022-01-12  2:26   ` Rob Herring
2022-02-06 17:36 ` [PATCH v2 0/4] leds/power/regulator/mfd: dt-bindings: " Krzysztof Kozlowski
2022-02-07  9:35   ` Lee Jones
2022-02-14 14:14 ` [GIT PULL] Immutable branch between MFD, LED, Power and Regulator due for the v5.18 merge window Lee Jones

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).