diff mbox series

[v12,05/11] dt-bindings: mfd: add maxim,max77705 sensors

Message ID 20241217-starqltechn_integration_upstream-v12-5-ed840944f948@gmail.com
State New
Headers show
Series Add support for Maxim Integrated MAX77705 PMIC | expand

Commit Message

Dzmitry Sankouski Dec. 17, 2024, 5:30 p.m. UTC
Add maxim,max77705 sensors binding part.
This includes fuelgauge and voltage/current sensor on
chip input and system bus.

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
---
 Documentation/devicetree/bindings/mfd/maxim,max77705-sensors.yaml | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)

Comments

Rob Herring (Arm) Dec. 17, 2024, 9:06 p.m. UTC | #1
On Tue, 17 Dec 2024 20:30:03 +0300, Dzmitry Sankouski wrote:
> Add maxim,max77705 sensors binding part.
> This includes fuelgauge and voltage/current sensor on
> chip input and system bus.
> 
> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> ---
>  Documentation/devicetree/bindings/mfd/maxim,max77705-sensors.yaml | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 60 insertions(+)
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/maxim,max77705-sensors.yaml: fuel-gauge: Missing additionalProperties/unevaluatedProperties constraint

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20241217-starqltechn_integration_upstream-v12-5-ed840944f948@gmail.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
Krzysztof Kozlowski Dec. 18, 2024, 8:26 a.m. UTC | #2
On Tue, Dec 17, 2024 at 08:30:03PM +0300, Dzmitry Sankouski wrote:
> Add maxim,max77705 sensors binding part.
> This includes fuelgauge and voltage/current sensor on
> chip input and system bus.
> 
> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> ---
>  Documentation/devicetree/bindings/mfd/maxim,max77705-sensors.yaml | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 60 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/maxim,max77705-sensors.yaml b/Documentation/devicetree/bindings/mfd/maxim,max77705-sensors.yaml
> new file mode 100644
> index 000000000000..738ce30ca72d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/maxim,max77705-sensors.yaml
> @@ -0,0 +1,60 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mfd/maxim,max77705-sensors.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Maxim MAX77705 Companion Power Management IC sensors part
> +
> +maintainers:
> +  - Dzmitry Sankouski <dsankouski@gmail.com>
> +
> +description: |
> +  The Maxim MAX77705 is a Companion Power Management sensors part includes
> +  fuelgauge and current/voltage monitor for charger input, and system bus.
> +
> +properties:
> +  compatible:
> +    const: maxim,max77705-sensors

Apologies for missing your reply in v11, somehow I was still waiting for
your reply and only now went back and found it. Maybe my filters moved
it too aggressively, it's actually tricky to get filters properly for
responses.

About this, I don't think there is such device. Measuring current inputs
is the job of fuel gauge. It's literally this device.

What's more, you do not have here any resources which is another hint
that this is not a separate device.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mfd/maxim,max77705-sensors.yaml b/Documentation/devicetree/bindings/mfd/maxim,max77705-sensors.yaml
new file mode 100644
index 000000000000..738ce30ca72d
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/maxim,max77705-sensors.yaml
@@ -0,0 +1,60 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/maxim,max77705-sensors.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim MAX77705 Companion Power Management IC sensors part
+
+maintainers:
+  - Dzmitry Sankouski <dsankouski@gmail.com>
+
+description: |
+  The Maxim MAX77705 is a Companion Power Management sensors part includes
+  fuelgauge and current/voltage monitor for charger input, and system bus.
+
+properties:
+  compatible:
+    const: maxim,max77705-sensors
+
+  reg:
+    maxItems: 1
+
+  fuel-gauge:
+    $ref: /schemas/power/supply/maxim,max17042-common.yaml#
+    properties:
+      compatible:
+        const: maxim,max77705-battery
+
+    required:
+      - compatible
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        sensors@36 {
+            compatible = "maxim,max77705-sensors";
+            reg = <0x36>;
+
+            fuel-gauge {
+                compatible = "maxim,max77705-battery";
+                power-supplies = <&max77705_charger>;
+                maxim,rsns-microohm = <5000>;
+                maxim,dead-volt = <3400>;
+                maxim,over-volt = <4350>;
+                interrupt-parent = <&pm8998_gpios>;
+                interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
+            };
+        };
+    };