From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CAB15C4332F for ; Wed, 2 Nov 2022 17:19:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231205AbiKBRTU (ORCPT ); Wed, 2 Nov 2022 13:19:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231197AbiKBRTT (ORCPT ); Wed, 2 Nov 2022 13:19:19 -0400 Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F5241DA58 for ; Wed, 2 Nov 2022 10:19:18 -0700 (PDT) Received: by mail-qt1-x82e.google.com with SMTP id hh9so11725888qtb.13 for ; Wed, 02 Nov 2022 10:19:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ZuNZiwTspOvveszR9vgomjaKTTLMN+99lIN1mFkCiBk=; b=JKARcNSCMLwZ7IU/UL9MiWjQPoJ1cRFxFHD0tzYYittrMegNLvmLBMCXjfNV+klloL EVPH7OjB4uVsMg/M3ewL/q5JVH+U/LyolRAJ/B18LewR6Ws8mhRCFPNGHfh7FPh/36es XwqAcIRedFJ2wTHYUfcAr2vc8V6mXuIEABm5tSHK9XXLVItKPLkJqKUiqvAKYGWmnvYe xqkh1OHxRhN7Jk5gVDgwtoIuQ8uW9ABuHw0cYCwk2/1Wm4DSJ6x8QSZswpcZtBPocuDX M6ZkS74X2VXIUBSjK8dr5IEKcnKcB4uJ1ELcdPlHTEKCh/VWetfVJQjViqDzw/LezmGJ BGdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZuNZiwTspOvveszR9vgomjaKTTLMN+99lIN1mFkCiBk=; b=skvcAoH1slLwCHvKbuKJu40TpKoYZKob5eeMt8nyFaZLod8jeRPboXNl3EFfqLGNyJ c5Ld6rp2HdySIIEjf6E5uU/04arQw4D9uDeJVm31Dx4FPVGBzdRnC6TouBaW400Orb/A rWPI+fZ1sZFaPkUb26a3mEtWaj6UUXohbEo6siGLiamu0NF2hqIZnc2YW1lNhCrgZOXv gAnyGAnKMc3T9FbCz6NOBDXk5ZqpraPbszpgQd1muyVD8hlYzwg7mlUv6lH9vv2VKrzy IAn1uv91QgBHJChVlDJInmGtDUGAI4/H68Oh/mxv6Q3+RRoeF1yNUWkFyDlmcd1vsIIp YXAg== X-Gm-Message-State: ACrzQf1eLuILL+BonKlCpR5CFnAhFzd2NCpMzqPLOuUbcQoyMqJ/6p1G kU48HBsHqsqfutdrhzvEwT8/UA== X-Google-Smtp-Source: AMsMyM7AJKiOMK2DSsRIhiRMmUb/A9J9eolD1EuQgjzs2RDIUygjrtKgEnHrLWIQ6AEKqnpqd1IKRw== X-Received: by 2002:ac8:7216:0:b0:3a5:3cb0:958 with SMTP id a22-20020ac87216000000b003a53cb00958mr7172235qtp.113.1667409557232; Wed, 02 Nov 2022 10:19:17 -0700 (PDT) Received: from ?IPV6:2601:586:5000:570:28d9:4790:bc16:cc93? ([2601:586:5000:570:28d9:4790:bc16:cc93]) by smtp.gmail.com with ESMTPSA id y24-20020a37f618000000b006cf19068261sm8637547qkj.116.2022.11.02.10.19.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Nov 2022 10:19:16 -0700 (PDT) Message-ID: Date: Wed, 2 Nov 2022 13:19:15 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH v4 1/2] dt-bindings: mfd: Add bindings for MAX5970 and MAX5978 Content-Language: en-US To: Naresh Solanki , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Lee Jones , Rob Herring , Krzysztof Kozlowski , Patrick Rudolph Cc: Marcello Sylvester Bauer References: <20221101165344.3455723-1-Naresh.Solanki@9elements.com> <20221101165344.3455723-2-Naresh.Solanki@9elements.com> From: Krzysztof Kozlowski In-Reply-To: <20221101165344.3455723-2-Naresh.Solanki@9elements.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 01/11/2022 12:53, Naresh Solanki wrote: > From: Marcello Sylvester Bauer > > The MAX597x is a hot swap controller with configurable fault protection. > It also has 10bit ADC for current & voltage measurements. > > Signed-off-by: Patrick Rudolph > Signed-off-by: Marcello Sylvester Bauer > Signed-off-by: Naresh Solanki > --- > .../devicetree/bindings/mfd/max5970.yaml | 164 ++++++++++++++++++ > 1 file changed, 164 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mfd/max5970.yaml > > diff --git a/Documentation/devicetree/bindings/mfd/max5970.yaml b/Documentation/devicetree/bindings/mfd/max5970.yaml > new file mode 100644 > index 000000000000..a0cc6a7543b5 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mfd/max5970.yaml Filename: missing vendor prefix. > @@ -0,0 +1,164 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mfd/max5970.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Regulator driver for MAX5970 smart switch from Maxim Integrated. Drop "driver" > + > +maintainers: > + - Patrick Rudolph > + > +description: | > + The smart switch provides no output regulation, but independent fault protection > + and voltage and current sensing. > + Programming is done through I2C bus. > + > + Datasheets: > + https://datasheets.maximintegrated.com/en/ds/MAX5970.pdf > + https://datasheets.maximintegrated.com/en/ds/MAX5978.pdf > + > +properties: > + compatible: > + enum: > + - maxim,max5970 > + - maxim,max5978 > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + leds: > + type: object > + description: > + Properties for single channel. > + > + patternProperties: > + "^led@[0-3]$": > + $ref: /schemas/leds/common.yaml# > + type: object > + > + additionalProperties: true This should be rather: false > + > + vss1-supply: > + description: Supply of the first channel. > + > + "#io-channel-cells": > + const: 1 > + > + regulators: > + type: object > + description: > + Properties for single channel. > + > + patternProperties: > + "^(sw[0-1])$": > + $ref: /schemas/regulator/regulator.yaml# > + type: object > + > + shunt-resistor-micro-ohms: > + description: | > + The value of curent sense resistor in microohms. > + Must be specified for each channel. > + > + additionalProperties: true > + > +required: > + - compatible > + - reg > + - regulators > + - vss1-supply > + > +allOf: > + - $ref: /schemas/regulator/regulator.yaml# > + - if: > + properties: > + compatible: > + enum: > + - maxim,max5970 > + then: > + properties: > + vss2-supply: > + description: Supply of the second channel. > + > + io-channels: > + items: > + - description: voltage first channel > + - description: current first channel > + - description: voltage second channel > + - description: current second channel > + description: | > + Voltage and current for first and second channel. > + required: > + - vss2-supply > + > + else: > + properties: > + io-channels: > + items: > + - description: voltage first channel > + - description: current first channel > + description: | > + Voltage and current for first channel. > + > +additionalProperties: false > + > +examples: > + - | > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; Use 4 spaces for example indentation. > + leds { > + #address-cells = <1>; > + #size-cells = <0>; > + led@0 { > + reg = <0>; > + label = "led0"; > + default-state = "on"; > + }; > + led@1 { > + reg = <1>; > + label = "led1"; > + default-state = "on"; > + }; > + }; What is this example about? It does not match your bindings. > + regulator@3a { > + reg = <0x3a>; > + vss1-supply = <&p3v3>; > + compatible = "maxim,max5978"; > + > + regulators { > + sw0_ref_0: SW0 { Does not look like you tested the bindings. Please run `make dt_binding_check` (see Documentation/devicetree/bindings/writing-schema.rst for instructions). > + regulator-compatible = "SW0"; > + shunt-resistor-micro-ohms = <12000>; > + }; > + }; > + }; > + }; > + > + - | > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + regulator@3a { > + reg = <0x3a>; > + vss1-supply = <&p3v3>; > + vss2-supply = <&p5v>; > + compatible = "maxim,max5970"; Compatible is first, then reg, then the rest. > + > + regulators { > + sw0_ref_1: SW0 { > + regulator-compatible = "SW0"; > + shunt-resistor-micro-ohms = <12000>; > + }; > + sw1_ref_1: SW1 { > + regulator-compatible = "SW1"; > + shunt-resistor-micro-ohms = <10000>; > + }; > + }; > + }; > + }; > +... Best regards, Krzysztof