[v1,1/2] dt-bindings: hwmon: Add mps mp5990 driver bindings

Message ID 20231103080128.1204218-2-peteryin.openbmc@gmail.com
State New
Headers
Series hwmon: (pmbus) Add support for MPS Multi-phase mp5990 |

Commit Message

Peter Yin Nov. 3, 2023, 8:01 a.m. UTC
  Add a device tree bindings for mp5990 device.

Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com>
---
 .../devicetree/bindings/hwmon/mps,mp5990.yaml | 43 +++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/mps,mp5990.yaml
  

Comments

Conor Dooley Nov. 3, 2023, 12:44 p.m. UTC | #1
Hey,

On Fri, Nov 03, 2023 at 04:01:26PM +0800, Peter Yin wrote:
> Add a device tree bindings for mp5990 device.
> 
> Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com>
> ---
>  .../devicetree/bindings/hwmon/mps,mp5990.yaml | 43 +++++++++++++++++++
>  1 file changed, 43 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwmon/mps,mp5990.yaml
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/mps,mp5990.yaml b/Documentation/devicetree/bindings/hwmon/mps,mp5990.yaml
> new file mode 100644
> index 000000000000..7533d69f1922
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/mps,mp5990.yaml
> @@ -0,0 +1,43 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/hwmon/mps,mp5990.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog Devices MP5990 HSC Controller

Analog Devices? Also, could you write that out rather than using the
"HSC" acronym?

> +
> +maintainers:
> +  - Peter Yin <peteryin.openbmc@gmail.com>
> +
> +description: |
> +  Analog Devices MP5990 HSC Controller

Ditto here, Analog Devices?

> +
> +  Datasheets:
> +  https://www.monolithicpower.com/en/mp5990.html
> +
> +properties:
> +  compatible:
> +    enum:
> +      - mps,mp5990

Do you expect this list to grow? If not, just use const: instead of
enum:

> +
> +  reg:

> +    description: I2C address of slave device.

Can drop this description.

Cheers,
Conor.

> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        power-sensor@20 {
> +            reg = <0x20>;
> +            compatible = "mps,mp5990";
> +        };
> +    };
> -- 
> 2.25.1
>
  

Patch

diff --git a/Documentation/devicetree/bindings/hwmon/mps,mp5990.yaml b/Documentation/devicetree/bindings/hwmon/mps,mp5990.yaml
new file mode 100644
index 000000000000..7533d69f1922
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/mps,mp5990.yaml
@@ -0,0 +1,43 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/mps,mp5990.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices MP5990 HSC Controller
+
+maintainers:
+  - Peter Yin <peteryin.openbmc@gmail.com>
+
+description: |
+  Analog Devices MP5990 HSC Controller
+
+  Datasheets:
+  https://www.monolithicpower.com/en/mp5990.html
+
+properties:
+  compatible:
+    enum:
+      - mps,mp5990
+
+  reg:
+    description: I2C address of slave device.
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        power-sensor@20 {
+            reg = <0x20>;
+            compatible = "mps,mp5990";
+        };
+    };