Re: [PATCH v1 1/2] dt-bindings: hwmon: Add lltc ltc4286 driver bindings

From: Guenter Roeck
Date: Mon Apr 24 2023 - 09:50:26 EST


On Mon, Apr 24, 2023 at 06:13:49PM +0800, Delphine CC Chiu wrote:
> Add a device tree bindings for ltc4286 driver.
>
> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@xxxxxxxxxx>
> ---
> .../bindings/hwmon/lltc,ltc4286.yaml | 47 +++++++++++++++++++
> MAINTAINERS | 9 ++++
> 2 files changed, 56 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/hwmon/lltc,ltc4286.yaml
>
> diff --git a/Documentation/devicetree/bindings/hwmon/lltc,ltc4286.yaml b/Documentation/devicetree/bindings/hwmon/lltc,ltc4286.yaml
> new file mode 100644
> index 000000000000..c1c8e310f9c4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/lltc,ltc4286.yaml
> @@ -0,0 +1,47 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/hwmon/lltc,ltc4286.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: LTC4286 power monitors
> +
> +maintainers:
> + - Delphine CC Chiu <Delphine_CC_Chiu@xxxxxxxxxx>
> +
> +properties:
> + compatible:
> + enum:
> + - lltc,ltc4286
> + - lltc,ltc4287

There is no LTC4287, at least according to the Analog website.

> +
> + reg:
> + maxItems: 1
> +
> + vrange_select_25p6:
> + description:
> + This property is a bool parameter to represent the
> + voltage range is 25.6 or not for this chip.

Existing attributes are adi,vrange-high-enable, ti,extended-range-enable,
ti,bus-range-microvolt, adi,range-double. I would suggest to use
adi,vrange-high-enable.

> +
> + rsense-micro-ohms:
> + description:
> + Resistor value in micro-Ohm

I would suggest either shunt-resistor-micro-ohms or
sense-resistor-micro-ohms as used by other bindings.

> +
> +required:
> + - compatible
> + - reg
> + - rsense-micro-ohms
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + i2c {
> + status = "okay";
> + ltc4286@40 {
> + compatible = "lltc,ltc4286";
> + reg = <0x40>;
> + vrange_select_25p6;
> + rsense-micro-ohms = <300>;
> + };
> + };
> diff --git a/MAINTAINERS b/MAINTAINERS
> index c6545eb54104..930bdba0f73c 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -12183,6 +12183,15 @@ S: Maintained
> F: Documentation/hwmon/ltc4261.rst
> F: drivers/hwmon/ltc4261.c
>
> +LTC4286 HARDWARE MONITOR DRIVER
> +M: Delphine CC Chiu <Delphine_CC_Chiu@xxxxxxxxxx>
> +L: linux-i2c@xxxxxxxxxxxxxxx
> +S: Maintained
> +F: Documentation/devicetree/bindings/hwmon/lltc,ltc4286.yaml
> +F: drivers/hwmon/pmbus/Kconfig
> +F: drivers/hwmon/pmbus/Makefile
> +F: drivers/hwmon/pmbus/ltc4286.c
> +
> LTC4306 I2C MULTIPLEXER DRIVER
> M: Michael Hennerich <michael.hennerich@xxxxxxxxxx>
> L: linux-i2c@xxxxxxxxxxxxxxx
> --
> 2.17.1
>