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: 11808 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp271849wru; Thu, 27 Oct 2022 07:44:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4/aFJay4mcfvoWvuVHIMkmeZXx2bjDpP6nCsHPBgicXX44bDcaUJv+1y4LL/ga6yTMQ/UZ X-Received: by 2002:a17:907:3f23:b0:78e:260a:fc33 with SMTP id hq35-20020a1709073f2300b0078e260afc33mr43079934ejc.152.1666881898524; Thu, 27 Oct 2022 07:44:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666881898; cv=none; d=google.com; s=arc-20160816; b=eF1+G9t1AD+C0G6ueirQOYrInegqwhFzkbLqkgz784xWOcPm+g+Wvu481SdGP3xqsR vlaeFTgIqiZ09/K9jW7BWehbB/qxYh/3N/2ipvn9/c0nvm37aJBoiYJ/ImrInJIeeiWN UkWsIBQnqOdIhDzXOmgcL/Jil9p7Y1yXzdrJeWxLXCx/vOeYznZW6M859LtVt+s0Hr/t EsCag3NoKiaMHSjEdAlIy6+MALdidGAkQsyDZ9Rz1RV/cXUhrGWVqiAfTYo/7Bo2DvzM AINeO1gKRaC9YBefc9mNHqptHjZ13xUafVM2WJjlgQj4gC4Q8XlZdb1bDlIO9c9kQuxf oQpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=1Elgx/yfm289sAtkCYegANchVqYKxAF2vr4d85UGafk=; b=YQZwt/Six0OwSq7GaGquOpR16h4+72J4phDd22/PT73hx3JLg8fLXvRmS9v9AHYf01 CEvT85P454b/GemVkXoSHBMxC3FwtsZ1fE4LL/oEOxnrrHAcfqNhGXhK8UfgyVxD+SuB RCnIv18IU5QYWGPjvJldFP4oTNQ7YBR7Pf4ZLs6JTUYoJwqXW8dx+SDwbTXQjK4bvqjF f51uvrvwhcQn0tTuy61CmyMv8clkUJmpS/0RSTsAY3C9mNUr2oqIPoTvjZBR8E7LoydL Zq7FwNPHV5wWrxs8OK3IkfriIq2aJB+V4+7ZAUM3g7BuHekkc7GgSdzqpf/8ULGU6ulH 1vlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qe2yzrEf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k23-20020a50ce57000000b004591f959c3bsi1650989edj.427.2022.10.27.07.44.10; Thu, 27 Oct 2022 07:44:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qe2yzrEf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235233AbiJ0Oeg (ORCPT + 99 others); Thu, 27 Oct 2022 10:34:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234367AbiJ0Oee (ORCPT ); Thu, 27 Oct 2022 10:34:34 -0400 Received: from mail-qv1-xf32.google.com (mail-qv1-xf32.google.com [IPv6:2607:f8b0:4864:20::f32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60DAB614E for ; Thu, 27 Oct 2022 07:34:30 -0700 (PDT) Received: by mail-qv1-xf32.google.com with SMTP id ml12so1478792qvb.0 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=o+XPXaM7pgDjuhpSEEpQHifN3Ssu/TLnJO4yus3cvTzwpOaWx7KDq8m8c6ytk+D1f2 lEpYgU9FkDkvEtYVUTZYznkmoxDt8NtA0+fy+51b1xepB96aTqVXlwF43FACIYJCwT3q Vri3r4tEBwzfxbETG+aLQur5ECtQaSTZqqMdhA/H2xHXHa1tEqe1B1CkecUQ8+HIRWfx KREIQuNDHedCwZRMHK8Q8TPctiV5uEMUTjSh3mRMhEJtsA3xj4uTMrEBtTTtd+Tk9k9n eXpJY/JNHIPX4CuS3gf8cy7QqIfcMHCvDw6nuUwYVKQAGslYIRWzFlaZoAVFaAMDrNl0 guUA== X-Gm-Message-State: ACrzQf1EvFHOV+4VBwWQ/iqafypOjJNNRhws4hLARKLOgkY2giy9hPXz l+tE2Rl5TPtDTFot5gBN1JHrng== 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747852354028884735?= X-GMAIL-MSGID: =?utf-8?q?1747852354028884735?= 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: 11809 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp272410wru; Thu, 27 Oct 2022 07:46:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5+aW6NZtuz+lpAD+36yb/946Rgb28JMJtbNZtYqf2T+6oiihnH//hMVAaF3Bn1hhg4L2QY X-Received: by 2002:a17:907:1687:b0:78e:4b6:1aff with SMTP id hc7-20020a170907168700b0078e04b61affmr41547011ejc.520.1666881960659; Thu, 27 Oct 2022 07:46:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666881960; cv=none; d=google.com; s=arc-20160816; b=u/IO6oE9FiYPcPHmx+NhGz/aAkndSVxWGuTcOy3hP41WYP3A2sbtZkZr2j+oNBoXL5 nbwVuP2TA8nGHpU+Ci9tIowXe9yRcEHW6QRyEkRw6c0hw7laPjIvopMNu0UG8eWxHOg5 7Qd7W08ySoUkOF1d8UFOvAuVBBP+ouCCAp+MVB8hUewBhA0s5emTh3CBExXXwYDd6pSO IPDFwgn3fh4zOlf+yCPCHyVDiB2CQmBKbdxjbNZs3Zz5QRtqPd8PMr+PKEHvWDqj7TPS ks/cLrz3k9uWdOuGts2m7zERXoO4XoDTYQJuXjxCQ7M7W4ORJks+UA7ij3X7TJH8NEgM +FBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gZo8y3T1IwmVEyZfktrXan3as4gJ0RmGr8oerP5joyY=; b=Bgz2n7VOZbvCYetDECnNOGUwfOhmBDzqhXZo+tAV8i4rwNXNEaVyFKEkvGjqSQOxKZ 5VW4AlWguEn33OtuRHrYvKZg8b1WZdpP1wARr8MvyNzCu8ohcfNIhk1Hv287V+Tzmz2W s1SFqKad9yxzvRn+jKauRR4JjbSQxYKi8UdYc2qIKD9Hj+UdBhUl1Td2esyUCAUSKxnH wqo/T0MlJDmn1yUWuahWEBvpstm9J3Z5B9zZ5fDoXnc/9j3TgbFn1cQIsnAk7NU5tuDT st/TtEbqOnGN4WRI+Iv4z/JtBXtsFBmgRLtNLdrtr8SEvsjqewohm1CXkTIQEzZXEU47 B1Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Gx0nB6zx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz10-20020a1709077d8a00b007abafd4d7d8si1577142ejc.706.2022.10.27.07.45.33; Thu, 27 Oct 2022 07:46:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Gx0nB6zx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235273AbiJ0Oej (ORCPT + 99 others); Thu, 27 Oct 2022 10:34:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234985AbiJ0Oeh (ORCPT ); Thu, 27 Oct 2022 10:34:37 -0400 Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00D3A654D for ; Thu, 27 Oct 2022 07:34:32 -0700 (PDT) Received: by mail-qv1-xf2a.google.com with SMTP id mi9so1436267qvb.8 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=tNqhOYKlj7iORwExGb6bWd7fqyhxiw/F81wJIePUoyXnn2Kmtl0t+ZfjPBa+DDC6q6 xg2LkyYFbPViVD4M4MUJPrIouQr50ClvquuR9fcJ6ZSi/ChEPc6XLaXGBaI5/YJmjxx8 3RPzLVk+JOPMHg8e6XKTxZldHFy+Dqk9TZvQ/ZdpyP1795KNcwsF853g3CLzryRFJKa8 uVN6DCW22IyuI8Uw06GqsJ6I63lLL3ro4UH6WIOCinjps/NE+HyF0N0axMZLkV7pgQIG TC6G4K5ZO8sOSQuRHv0W1Of0BL4JAtssCtaXii3NVzaB3IcwsqF9jgMZu///LdunQbCZ miVQ== X-Gm-Message-State: ACrzQf1gUM64BlLG2sYgA9NH8fNvJBqeD4IKgZd6/30R8+RmPN+XC05w /5ncTJFVj4wYkmAJBnSndHt+Yg== 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747852418818388771?= X-GMAIL-MSGID: =?utf-8?q?1747852418818388771?= 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>; + }; }; - }; };