[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250814215724.GA3975144-robh@kernel.org>
Date: Thu, 14 Aug 2025 16:57:24 -0500
From: Rob Herring <robh@...nel.org>
To: Nuno Sá <nuno.sa@...log.com>
Cc: linux-hwmon@...r.kernel.org, linux-gpio@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, Lee Jones <lee@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Jean Delvare <jdelvare@...e.com>,
Guenter Roeck <linux@...ck-us.net>,
Jonathan Corbet <corbet@....net>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>
Subject: Re: [PATCH 1/6] dt-binbings: mfd: Add bindings for the LTC4283 Swap
Controller
On Thu, Aug 14, 2025 at 11:52:23AM +0100, Nuno Sá wrote:
> The LTC4283 is a negative voltage hot swap controller that drives an
> external N-channel MOSFET to allow a board to be safely inserted and
> removed from a live backplane.
What's a binbing?
When you fix that, don't say 'bindings' twice in the subject. Subject
space is precious.
>
> Main usage is as an Hardware Monitoring device. However, it has up to 8
> pins that can be configured and used as GPIOs and hence, the device can
> also be a GPIO controller.
>
> Signed-off-by: Nuno Sá <nuno.sa@...log.com>
> ---
> .../devicetree/bindings/mfd/adi,ltc4283.yaml | 85 ++++++++++++++++++++++
> MAINTAINERS | 7 ++
> 2 files changed, 92 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/mfd/adi,ltc4283.yaml b/Documentation/devicetree/bindings/mfd/adi,ltc4283.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..c5e8aec887d9cfad9052a7c28783396efd6804a9
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/adi,ltc4283.yaml
> @@ -0,0 +1,85 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mfd/adi,ltc4283.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: LTC4283 I2C Negative Voltage Hot Swap Controller
> +
> +maintainers:
> + - Nuno Sá <nuno.sa@...log.com>
> +
> +description: |
> + The LTC4283 negative voltage hot swap controller drives an external N-channel
> + MOSFET to allow a board to be safely inserted and removed from a live
> + backplane.
> +
> + https://www.analog.com/media/en/technical-documentation/data-sheets/ltc4283.pdf
> +
> +properties:
> + compatible:
> + enum:
> + - adi,ltc4283
> +
> + reg:
> + maxItems: 1
> +
> + gpio:
> + $ref: /schemas/gpio/adi,ltc4283.yaml
> + hwmon:
> + $ref: /schemas/hwmon/adi,ltc4283.yaml
This patch has to come after these are added. However...
> +
> + adi,gpio-pins:
> + description:
> + The pins to use as GPIOs. The device has 4 ADIO and 4 PGIO
> + pins than can be used as GPIOs. The ADIO pins are numbered from 0 to 3
> + and the PGIO pins are numbered from 4 to 7.
> + $ref: /schemas/types.yaml#/definitions/uint32-array
> + minItems: 1
> + maxItems: 8
> + items:
> + minimum: 0
> + maximum: 7
> +
> +dependencies:
> + gpio:
> + - adi,gpio-pins
> +
> +required:
> + - compatible
> + - reg
> + - hwmon
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + swap-controller@15 {
> + compatible = "adi,ltc4283";
> + reg = <0x15>;
> +
> + /* pgio1 to pgio4 as gpios */
> + adi,gpio-pins = <0 1 2 3>;
> +
> + gpio {
> + compatible = "adi,ltc4283-gpio";
> + gpio-controller;
> + #gpio-cells = <2>;
> + };
> +
> + hwmon {
> + compatible = "adi,ltc4283-hwmon";
> +
> + adi,rsense-nano-ohms = <500>;
Seems like a current sense resistor might be a common thing.
> + adi,current-limit-sense-microvolt = <25000>;
> + adi,current-limit-foldback-factor = <10>;
> + adi,cooling-delay-ms = <8190>;
> + adi,fet-bad-timer-delay-ms = <512>;
All these child node properties can be moved to the parent node.
> + };
> + };
> + };
> +...
> diff --git a/MAINTAINERS b/MAINTAINERS
> index e90710a9b40d7b32c151472a9ac3b02efd95f346..413bb77d5eebe2b51aa9c3af86e7cfd5ab142044 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -14500,6 +14500,13 @@ F: Documentation/devicetree/bindings/hwmon/adi,ltc4282.yaml
> F: Documentation/hwmon/ltc4282.rst
> F: drivers/hwmon/ltc4282.c
>
> +lTC4283 HARDWARE MONITOR AND GPIO DRIVER
> +M: Nuno Sá <nuno.sa@...log.com>
> +L: linux-hwmon@...r.kernel.org
> +L: linux-gpio@...r.kernel.org
> +S: Supported
> +F: Documentation/devicetree/bindings/mfd/adi,ltc4283.yaml
> +
> LTC4286 HARDWARE MONITOR DRIVER
> M: Delphine CC Chiu <Delphine_CC_Chiu@...ynn.com>
> L: linux-hwmon@...r.kernel.org
>
> --
> 2.50.1
>
Powered by blists - more mailing lists