diff mbox series

[v1,7/9] dt-bindings: regulator: keembay: Add DT binding documentation

Message ID 20210114152700.21916-8-muhammad.husaini.zulkifli@intel.com
State New
Headers show
Series mmc: sdhci-of-arasan: Add UHS-1 support for Keem Bay SOC | expand

Commit Message

Zulkifli, Muhammad Husaini Jan. 14, 2021, 3:26 p.m. UTC
Add DT Binding Documentation for Keem Bay SD Regulator.

Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
---
 .../bindings/regulator/keembay-regulator.yaml | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/keembay-regulator.yaml

Comments

Mark Brown Jan. 14, 2021, 4:52 p.m. UTC | #1
On Thu, Jan 14, 2021 at 11:26:58PM +0800, Muhammad Husaini Zulkifli wrote:
> Add DT Binding Documentation for Keem Bay SD Regulator.

Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
There's no need to resubmit to fix this alone.

> +properties:
> +  compatible:
> +    const: regulator-keembay-sd

Device tree compatible strings should be in the format vendor,device.

> +required:
> +  - compatible
> +  - regulator-name

Why is regulator-name required here?  This is a standard regulator
binding property which is covered by the generic regulator bindings and
should be optional since it is for use by the system integrator to
provide more user friendly diagnostic information about which supply
this is in the system.  If you are attempting to use this for device
identification then you should be using different compatible strings for
the different regulators - even if you were using regulator-name you'd
need to document the values.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/regulator/keembay-regulator.yaml b/Documentation/devicetree/bindings/regulator/keembay-regulator.yaml
new file mode 100644
index 000000000000..a32e87c9eeed
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/keembay-regulator.yaml
@@ -0,0 +1,36 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/keembay-regulator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Keem Bay SD regulator
+
+maintainers:
+  - Muhammad Husaini Zulkifli <Muhammad.Husaini.Zulkifli@intel.com>
+
+allOf:
+  - $ref: "regulator.yaml#"
+
+properties:
+  compatible:
+    const: regulator-keembay-sd
+
+  regulator-name: true
+
+required:
+  - compatible
+  - regulator-name
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    regulator_rail {
+      compatible = "regulator-keembay-sd";
+
+      regulator-name = "sd-volt-rail";
+      regulator-min-microvolt = <1800000>;
+      regulator-max-microvolt = <3300000>;
+    };
+...