From patchwork Thu Nov 3 13:00:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cosmin Tanislav X-Patchwork-Id: 14852 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp517318wru; Thu, 3 Nov 2022 06:06:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5F3TtRZ8FTWLL2wjlyIm7PHwx41YNBYKwCBx3SxReT4qKen7g3BU6lwMsvJHtOoAqU2GhA X-Received: by 2002:a05:6402:414f:b0:456:c2c1:23ec with SMTP id x15-20020a056402414f00b00456c2c123ecmr30656620eda.420.1667480782781; Thu, 03 Nov 2022 06:06:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667480782; cv=none; d=google.com; s=arc-20160816; b=dOpm4/yUgNUj1lk43rStAxHQUj2Lx6tyd2hlFIuiZfro7ODOCy7IgKGHic1/FagsHJ hKaL5Km6zEHmLoh382/hDfPVlgpLQWn2x3xD5n1fivJFKMJGZyB50ghacyZc8SBHJ4nt wbBl6lp4NMpO4B2dFHSCKtmT4uw/njH92jcOK+JjHE9Z3BDLKd0hEbwWwm/hY47WsMaq A9Wytfg5Mp92Y1VTAMGVi9ooh65zDboypm/l4GZdCXusOFgwBTQHRaF3eX6laTJAK/37 5dV0VrWorF6yvAHRGwPKrcSYiLyyCh3uDhzTFS6gPo0gyKw5Hva0kBb8wNwiNqb8YXiy gY9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=Wl5YV1yuldlFg2w/72zvpuZsJu+kXHIm+tqTSmy2/d8=; b=I690hdwUAgPMPG2Obn6T+jlJbTp00vjyLrDL8jXzzC0Ln6VDqzlUtx/0+tZFsUnwSC CB4Gpzi9NxiSWADoyRGt39QYzD+CHpU2rWL1A+WT94MQQvyq2HO6Tecoe1cwYGBC+ier mOIl5AiwReBSOH4NxTcdR5rBWcItcVQsn7c5b4sadLCfLvXqz1l9Z2Yr2LdsuapwljnI PCy3VX5pHbDAoSXUv38KUp2DItan1YBU8WlA4TZmnMc4ZJe4tOUoEuiXjLYP3dXDqLha iEFctxjOjLOAurhuCZ8In34SZGQ8N/vFNVwPtgLUPBWRNDDfw6E/t7OtgPYY846XiDfd u1Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=CPONfOgi; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb27-20020a170907961b00b007ae0ea7fbb1si1328939ejc.812.2022.11.03.06.05.36; Thu, 03 Nov 2022 06:06:22 -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=fail header.i=@gmail.com header.s=20210112 header.b=CPONfOgi; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230267AbiKCNCD (ORCPT + 99 others); Thu, 3 Nov 2022 09:02:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231778AbiKCNBv (ORCPT ); Thu, 3 Nov 2022 09:01:51 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80F56140B7; Thu, 3 Nov 2022 06:01:23 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id f27so5048996eje.1; Thu, 03 Nov 2022 06:01:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=Wl5YV1yuldlFg2w/72zvpuZsJu+kXHIm+tqTSmy2/d8=; b=CPONfOgiGcvco/Rskk0DdFbIZ6HfBYRnFSFdPUAnHEC+XwcCXJCsupfbw3rVgS3WNv BaS1aWtcXN6CYybLmhEOjR+zwsqQmER5EQZb4WwjGlJwUD3uKQKaU7y6raDhT5HKa12G SNyARbOgA/gLJkgyoe7Yp/poxlzsPLjmK2XlYmtmqgZ4yE8u2etgLAdQl2YEZJzJGYU8 1Bg/Eqc63Xs+Qa6K7xfCwZ8OeUZzyCLTyiUnU2J5ngw/bn/GJksblf7OAZXriwGgmagC BQWpu6cqpULKzsIISCWL1+yzx2Ou+axpQNFD6XLQsVLaw972Z/n4+eSHoT77VG2ab0Mc OQpw== 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=Wl5YV1yuldlFg2w/72zvpuZsJu+kXHIm+tqTSmy2/d8=; b=7z2TEYa7f9NCiHUioV13N2whYO057UsoNHppPkXESXVX6yrUEfceIh/0a0iYcFRT6H TPVa/ijNLSZK9Qo+BOKVQs0AwFHTfze7Wvmr6BfcwPgAVrggDhs8ryAJKUFHswvho4TA IQQ1VrGI0gC4Rt6ungR08jDufrwBFuuOYsKKeZ7BIrxHUJPHfc0wDJqGUrHxYJfkwuzW 2HVqVr669iYO8KBHt+jWbZWDWYsvgazatOtz1ysEbAJAj9V9KGYeG1rJpXg0aY8Uzn+A f/4UIzy9EokN79qAt9BjcSYjjNaYFIcTsNh0eW3zssFjyLika1IvCOdbqD/vxnWZG9ln NNng== X-Gm-Message-State: ACrzQf2rhuM55+O+fDFVLSOcTBVc2Wf4oS/NwDi9sL8ou7AdVNxaEoxS 5GKFxCzhJcC9e2W88YW9gCQ= X-Received: by 2002:a17:907:7617:b0:7ad:c0d5:bdf1 with SMTP id jx23-20020a170907761700b007adc0d5bdf1mr23207559ejc.211.1667480481889; Thu, 03 Nov 2022 06:01:21 -0700 (PDT) Received: from localhost.localdomain ([5.2.194.157]) by smtp.gmail.com with ESMTPSA id q12-20020a17090676cc00b00779a605c777sm451829ejn.192.2022.11.03.06.01.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 06:01:21 -0700 (PDT) From: Cosmin Tanislav Cc: Lars-Peter Clausen , Michael Hennerich , =?utf-8?q?Nuno_S=C3=A1?= , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Cosmin Tanislav Subject: [PATCH v4 07/13] dt-bindings: iio: temperature: ltc2983: require 4 wire rtd for current rotate Date: Thu, 3 Nov 2022 15:00:35 +0200 Message-Id: <20221103130041.2153295-8-demonsingur@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221103130041.2153295-1-demonsingur@gmail.com> References: <20221103130041.2153295-1-demonsingur@gmail.com> 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,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) 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?1748480328832847869?= X-GMAIL-MSGID: =?utf-8?q?1748480328832847869?= From: Cosmin Tanislav The driver will error out when current rotation is enabled but the RTD is not 4-wire. Require it in the binding too. Signed-off-by: Cosmin Tanislav Reviewed-by: Rob Herring --- .../bindings/iio/temperature/adi,ltc2983.yaml | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml index bbac5f5cfbb3..b603219fb0c9 100644 --- a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml +++ b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml @@ -230,13 +230,6 @@ patternProperties: resistor is used for multiple 2-, 3-, and/or 4-wire RTDs. type: boolean - adi,current-rotate: - description: - Boolean property which enables excitation current rotation to - automatically remove parasitic thermocouple effects. Note that - this property is not allowed for 2- and 3-wire RTDs. - type: boolean - adi,excitation-current-microamp: description: This property controls the magnitude of the excitation current @@ -269,10 +262,22 @@ patternProperties: required: - adi,rsense-handle - dependencies: - adi,current-rotate: [ "adi,rsense-share" ] - allOf: + - if: + properties: + adi,number-of-wires: + const: 4 + then: + properties: + adi,current-rotate: + description: + Whether to enable excitation current rotation to automatically + remove parasitic thermocouple effects. + type: boolean + + dependencies: + adi,current-rotate: [ "adi,rsense-share" ] + - if: properties: adi,sensor-type: