lkml.org 
[lkml]   [2023]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/2] dt-bindings: hwmon: add renesas,isl28022
From
On 7/26/23 08:22, Carsten Spieß wrote:
> Add dt-bindings for Renesase ISL28022 power monitor.
>
> Signed-off-by: Carsten Spieß <mail@carsten-spiess.de>
> ---
> .../bindings/hwmon/renesas,isl28022.yaml | 67 +++++++++++++++++++
> MAINTAINERS | 1 +
> 2 files changed, 68 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/hwmon/renesas,isl28022.yaml
>
> diff --git a/Documentation/devicetree/bindings/hwmon/renesas,isl28022.yaml b/Documentation/devicetree/bindings/hwmon/renesas,isl28022.yaml
> new file mode 100644
> index 000000000000..5ecf892db269
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/renesas,isl28022.yaml
> @@ -0,0 +1,67 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +
> +$id: http://devicetree.org/schemas/hwmon/renesas,isl28022.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Renesas ISL28022 power monitor
> +
> +maintainers:
> + - Carsten Spieß <mail@carsten-spiess.de>
> +
> +description: |
> + The ISL28022 is a power monitor with I2C interface. The device monitors
> + voltage, current via shunt resistor and calculated power.
> +
> + Datasheets:
> + https://www.renesas.com/us/en/www/doc/datasheet/isl28022.pdf
> +
> +Required properties:
> + compatible:
> + enum:
> + - renesas,isl28022
> +
> + reg:
> + maxItems: 1
> +
> +Optional properties:
> + shunt-resistor-micro-ohms:
> + description:
> + Shunt resistor value in micro-Ohm
> + defaults to <0> when not set
> + monitoring of current and power not supported when <0>
> +

Should not default to 0 (disabled).

> + shunt-gain:
> + description:
> + Shunt gain to scale maximal shunt voltage to
> + 40mV, 80mV, 160mV, 320mV
> + defaults to <8> (320mV) when not set
> + enum: [1, 2, 4, 8]
> +
> + average:
> + description: |
> + Number of samples to be used to report voltage, current and power values.
> + defaults to <0> when not set
> + enum: [0, 1, 2, 4, 8, 16, 32, 64, 128]

Should not default to 0 (disabled).

> +
> +required:
> + - compatible
> + - reg
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + power-monitor@40 {
> + compatible = "renesas,isl28022";
> + reg = <0x10>;
> + shunt-resistor-micro-ohms = <8000>;
> + shunt-gain = <1>;
> + average = <128>;
> + };
> + };
> diff --git a/MAINTAINERS b/MAINTAINERS
> index c61aa688cd11..ec9b97ace50b 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -11076,6 +11076,7 @@ ISL28022 HARDWARE MONITORING DRIVER
> M: Carsten Spieß <mail@carsten-spiess.de>
> L: linux-hwmon@vger.kernel.org
> S: Maintained
> +F: Documentation/devicetree/bindings/hwmon/renesas,isl28022.yaml
> F: Documentation/hwmon/isl28022.rst
> F: drivers/hwmon/isl28022.c
>

\
 
 \ /
  Last update: 2023-07-26 18:17    [W:0.045 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site