From patchwork Thu Oct 27 14:34:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13022215 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 541CBFA3741 for ; Thu, 27 Oct 2022 14:34:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235181AbiJ0Oeg (ORCPT ); Thu, 27 Oct 2022 10:34:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234974AbiJ0Oee (ORCPT ); Thu, 27 Oct 2022 10:34:34 -0400 Received: from mail-qv1-xf2c.google.com (mail-qv1-xf2c.google.com [IPv6:2607:f8b0:4864:20::f2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C95C60EA for ; Thu, 27 Oct 2022 07:34:30 -0700 (PDT) Received: by mail-qv1-xf2c.google.com with SMTP id x13so1436234qvn.6 for ; Thu, 27 Oct 2022 07:34:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=1Elgx/yfm289sAtkCYegANchVqYKxAF2vr4d85UGafk=; b=qe2yzrEfB6gYDu97LZwQjj8l1w5YksJdkQuZJRNijntprQa6U6HSXv5tsDs7aCuFPo cmpqdfBvFiLWtJp/lBumeuvsP3Y8aRChyg5VnnZTA2R0FGCrBtseoY+x0WUTibasrIJC WHdWALtH0uPoTT9k70bzSaO50tkgUYWYQarzkzLvfFMnn6qVRfxQ3aqWoC3Of7KHCebc ZoqyOPXscRD+LiXlVBXvF1s2Xeipvv6lwopSUoqH3eld9CVDmZubKY1ZMtI73RoRf0yD iGv0QlCXLdXvmWSPBcsJ0WBDhnMCFUBru1/sPzd0oTdORVRMwSqR23HONbnHMsR/eVpY WoJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1Elgx/yfm289sAtkCYegANchVqYKxAF2vr4d85UGafk=; b=bVKmrHAw2VhLj9yIQhqqeqxGeCANJ6mkcGPk6i7ugMy0fsugFCo6X38JT2r73JZ2zz deRf6D/WC8WP+7oFnuqT6lfMpDrqeZUS1UfpRGLEV8NhR0VPplNEchfeGWGYs/fm5bKU ZtMDJ0sDh/Qgn8icncaKddMwyUlNAQ7AYkMRtmRkA4mJ61+KezIDei0Dv1mgUFHdodDg 79BJLgBajYDIhZVN5eFa1s36pjtSwygai7YGe5olgjPaPTHhW5A2skdnE3RLQiSgwhn1 190lls8i+XwjPHfkd7Vb4MiWHakFqEIhbMTRoBTuyLUnjkaw121/kqfxRoACYYHDCry4 P6Ww== X-Gm-Message-State: ACrzQf0SwPU4mib207Hv/PuB5pkfZKdQSOa+hq234IaJ2N9ZjNCGxrud 1N2tfnoaFdDOyl9+6JJ0KLsaibjQEKapGA== X-Google-Smtp-Source: AMsMyM46cXvgjnQPpBH112h9LLu7kzNk/O4CQ0zeyEfk4ob+MF+ZhGEsvn9O6xNqUxB/arblHia0CA== X-Received: by 2002:ad4:4ea7:0:b0:4b9:365b:2a86 with SMTP id ed7-20020ad44ea7000000b004b9365b2a86mr31544620qvb.58.1666881269483; Thu, 27 Oct 2022 07:34:29 -0700 (PDT) Received: from krzk-bin.. ([64.57.193.93]) by smtp.gmail.com with ESMTPSA id w10-20020a05620a444a00b006f9e103260dsm1076749qkp.91.2022.10.27.07.34.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Oct 2022 07:34:28 -0700 (PDT) From: Krzysztof Kozlowski To: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 1/2] dt-bindings: iio: adc: qcom,spmi-vadc: simplify compatible enum Date: Thu, 27 Oct 2022 10:34:10 -0400 Message-Id: <20221027143411.277980-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org The second compatible item in oneOf is just an enum, not a list. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring --- .../devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml index 8bac0c4120dd..a848df37db06 100644 --- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml +++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml @@ -22,13 +22,11 @@ properties: - items: - const: qcom,pms405-adc - const: qcom,spmi-adc-rev2 - - - items: - - enum: - - qcom,spmi-vadc - - qcom,spmi-adc5 - - qcom,spmi-adc-rev2 - - qcom,spmi-adc7 + - enum: + - qcom,spmi-vadc + - qcom,spmi-adc5 + - qcom,spmi-adc-rev2 + - qcom,spmi-adc7 reg: description: VADC base address in the SPMI PMIC register map From patchwork Thu Oct 27 14:34:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13022216 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 F3546FA3744 for ; Thu, 27 Oct 2022 14:34:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235056AbiJ0Oeg (ORCPT ); Thu, 27 Oct 2022 10:34:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234509AbiJ0Oee (ORCPT ); Thu, 27 Oct 2022 10:34:34 -0400 Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00DE86559 for ; Thu, 27 Oct 2022 07:34:32 -0700 (PDT) Received: by mail-qv1-xf2e.google.com with SMTP id x13so1436300qvn.6 for ; Thu, 27 Oct 2022 07:34:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gZo8y3T1IwmVEyZfktrXan3as4gJ0RmGr8oerP5joyY=; b=Gx0nB6zxtpGH17ebvf0fGyH9Kf66KGlOwRBi4OOc/uRL0/ehmchmTLkQbLC9dK1Hkg GiC0MiVeFpZSky3YOe8a2VhE/SrsZCs/iM/z0VaCNpvFIDpbJUfI/F8mKmT33Wn7abGa chpRWlcQc3RVMq1RCj1XzvCe8of+vCQ1W/rsMr9634oYMoZkBvRl1Ns43IvHggq4A/P3 goYLPlaI/EfEOZeTsFTmdUJ1mff/ESOu+onM8L5x9D44ZwxqnHI2wcnBKVz7ZAZSWVIu +WlmzwzJJNZVqbtGbpQHYVoffaCKbdHFNW9EjOcpf/lt7EmT70UcBVoBRTJlj/g23I7e fstw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gZo8y3T1IwmVEyZfktrXan3as4gJ0RmGr8oerP5joyY=; b=toYSY91E20qXWkBKNvPJ+HWmfcp6UPnjybcMgkXuCfWNPC/6UQjjrzBDSUSSqzh1oJ qAWXx7HnN4AYkX/niqYuN/uLwRt8beIEXxzu7ImELKH/u1ryTzUmIq+e+lfscYSOe4zi P07QyP8TtQZHz2p4VK5CShxyHsFvtcY3tovAxnY47xc1Zth/BX9T2eQISFhskIj6cSbj X14IwmJwY2offSdcPmQKzBa1O5T6ZKjL+lDodDh25irDxzX8jJ72Qpj8YC7fJUijjyX1 PFUz6g+CJeL2JAbnf0s5KcQxTx8czkPtp13/FEXHn1DwBWKM3xupZkBUxf8PZvgGjYks z3wA== X-Gm-Message-State: ACrzQf3O7vr3ZW8hA6e8ytY+sdssIfTZy+DoIEioDnLSflwwdMDGqSpd spFH6Ni1t70n9xgfhNSXXdeIDw== X-Google-Smtp-Source: AMsMyM6w5pR1N+8+jwkfd3fB44RJoWs/BEJIBH6MzBKIAZFYWzpKrfgIgc/Io3BAA/QEfdpGzdUcig== X-Received: by 2002:a05:6214:20e6:b0:4b1:996d:c1f2 with SMTP id 6-20020a05621420e600b004b1996dc1f2mr40924700qvk.11.1666881271116; Thu, 27 Oct 2022 07:34:31 -0700 (PDT) Received: from krzk-bin.. ([64.57.193.93]) by smtp.gmail.com with ESMTPSA id w10-20020a05620a444a00b006f9e103260dsm1076749qkp.91.2022.10.27.07.34.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Oct 2022 07:34:30 -0700 (PDT) From: Krzysztof Kozlowski To: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 2/2] dt-bindings: iio: adc: qcom,spmi-vadc: extend example Date: Thu, 27 Oct 2022 10:34:11 -0400 Message-Id: <20221027143411.277980-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221027143411.277980-1-krzysztof.kozlowski@linaro.org> References: <20221027143411.277980-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Cleanup existing example (generic node name for spmi, use 4-space indentation) and add example for ADCv7 copied from Documentation/devicetree/bindings/thermal/qcom-spmi-adc-tm5.yaml. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring --- .../bindings/iio/adc/qcom,spmi-vadc.yaml | 94 ++++++++++++------- 1 file changed, 62 insertions(+), 32 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml index a848df37db06..f1522196042d 100644 --- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml +++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.yaml @@ -236,42 +236,72 @@ additionalProperties: false examples: - | - spmi_bus { - #address-cells = <1>; - #size-cells = <0>; - /* VADC node */ - pmic_vadc: adc@3100 { - compatible = "qcom,spmi-vadc"; - reg = <0x3100>; - interrupts = <0x0 0x31 0x0 0x1>; + spmi { #address-cells = <1>; #size-cells = <0>; - #io-channel-cells = <1>; - - /* Channel node */ - adc-chan@39 { - reg = <0x39>; - qcom,decimation = <512>; - qcom,ratiometric; - qcom,hw-settle-time = <200>; - qcom,avg-samples = <1>; - qcom,pre-scaling = <1 3>; - }; - - adc-chan@9 { - reg = <0x9>; - }; - - adc-chan@a { - reg = <0xa>; + /* VADC node */ + pmic_vadc: adc@3100 { + compatible = "qcom,spmi-vadc"; + reg = <0x3100>; + interrupts = <0x0 0x31 0x0 0x1>; + #address-cells = <1>; + #size-cells = <0>; + #io-channel-cells = <1>; + + /* Channel node */ + adc-chan@39 { + reg = <0x39>; + qcom,decimation = <512>; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,avg-samples = <1>; + qcom,pre-scaling = <1 3>; + }; + + adc-chan@9 { + reg = <0x9>; + }; + + adc-chan@a { + reg = <0xa>; + }; + + adc-chan@e { + reg = <0xe>; + }; + + adc-chan@f { + reg = <0xf>; + }; }; + }; - adc-chan@e { - reg = <0xe>; - }; + - | + #include + #include + #include - adc-chan@f { - reg = <0xf>; + spmi { + #address-cells = <1>; + #size-cells = <0>; + adc@3100 { + reg = <0x3100>; + compatible = "qcom,spmi-adc7"; + #address-cells = <1>; + #size-cells = <0>; + #io-channel-cells = <1>; + + /* Other properties are omitted */ + xo-therm@44 { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + + conn-therm@47 { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; }; - }; };