From patchwork Thu Nov 3 13:00:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cosmin Tanislav X-Patchwork-Id: 14859 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp518122wru; Thu, 3 Nov 2022 06:07:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ZvPmX8wwcrVq6WGgjlpg2GCF81n/vgib4FAbanKOtvkGLe5mDPLF4wfyvGPBzTi8fbCPk X-Received: by 2002:a17:903:1c6:b0:185:47ce:f4f0 with SMTP id e6-20020a17090301c600b0018547cef4f0mr30798321plh.132.1667480843009; Thu, 03 Nov 2022 06:07:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667480843; cv=none; d=google.com; s=arc-20160816; b=0MVxo1luQEGB4sYmo3aEkv8c+ueJtgfbdm0Pmq101TWE9zET79Z0UBdk/A0UJNeENC dG+K1EoHc5mukN9kvX6nXaxP86HiO35ryObidY42Crp2EnH8MJqC2MmlLw0GlROTT7YA ek3l+m5wCwgp+y83cAsNrhVBx8P8mCJQB7B9wr+9G1WlGT/fyIpaesdaMuecUk5lGY9Z H9Q5NV8CEI1OF/g+bhZzUU+1mmwpc+xPlaGM/9BIQdkTwuiwBPJFGe7f3PyYhiiiH5wB AfBGdvWNIOtdo2l9fJJ+CesacZP8k/tArUUPeptMHmqeCNvSv/wrKc7RtAGByxpJQ/bF HkoQ== 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=Zzx2/3zXVy+XSamreVFgLFmkVq8rfCdvsS38b4AXRWY=; b=dyLSrq5a/j4jqi5KFHy+zdL/hmiK+H4ze5XZhbcGBrQk/nV97e6F5WLcHr5Fxxr+c2 mFBWtH96AxbV6zPD05d3aygRrv9QJu7CT0nt0vnUYSANobbOmky6sHZyCkLUJSiU0y9f OynJtgPnwOnVAIuKZY8qnMpBqFWYjQDe40snGbA/cWUC43IE4VFyxImAVKkrLrOIYEKV nNU3r74wd3CffMh6fGySzHonMobBR6aqBlys0pz3GSKRGK3FBGlsdpzFxvpf1eYvqIG/ ZrXSLDOBM7D5UERpk6ysZagr4nnmCe+kq9emgLVZyCLz0mZ6YuMCIxEpZFxnSXBA+asq vX0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b=X1CPalRZ; 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 j63-20020a62c542000000b0053e1d872a91si916986pfg.83.2022.11.03.06.07.09; Thu, 03 Nov 2022 06:07: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=X1CPalRZ; 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 S231777AbiKCNB7 (ORCPT + 99 others); Thu, 3 Nov 2022 09:01:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231740AbiKCNBh (ORCPT ); Thu, 3 Nov 2022 09:01:37 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5CF714D08; Thu, 3 Nov 2022 06:01:21 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id a5so2834830edb.11; Thu, 03 Nov 2022 06:01:21 -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=Zzx2/3zXVy+XSamreVFgLFmkVq8rfCdvsS38b4AXRWY=; b=X1CPalRZEolGGCg7hNs9GpAz8NcvoKOm73Glkl6rdeCTYeNycT8nGqnS4slOaXXcUP sQHQcKYJiArOGahmozpOM/uq3pjz0CracaSSKah4t6XDy6W8NzHSuGdbJ2C/ah4tezPO jfPnX8gO6pt1IKhFQA6swYZM2UQjqREJzy7/SshzvXSKP8AsR8AzGcyRNzex9pAycfGW dd5DA71qJv+QL8MBGppz3JG+qejX96opwqOIdyhyL+ngT+87YCORC3zCxtuKzLRRvm5I MYzySPiHaDehn95AGczZe0oZxouHGQUecRo6MKht7i4U7j7NnuRtA7s13fZCXUQjLhD1 aSEg== 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=Zzx2/3zXVy+XSamreVFgLFmkVq8rfCdvsS38b4AXRWY=; b=jpQZXjdSbj7vlPFMwwjx4ITUhgSMnJO/0Sjj9n/kbea4+wWwMikP7HGMHSEpzIPj0/ XKvx66hMOlCvhmxOGC6zTdDJ+xUL/E6asmOFFuxgc3cha/6ixLKh1C+Qq2TLJ+zv8xvQ PeOgoe2hSCZKaSh9hqWOovtEMuKFAQbajGXCtC6xB66Zi5QeQ2OJngjSblk/qnTxkp1U M7iEm0Eypu4xcbFITd5BXOj+DiJDcsRkv267z2aBesiHP3RqPwPQpAbyLBwatSFLbC69 af1pSPDN9VNR+pQqc5JWA/xt8uNiEh3n+e89nBtmoGUpfzr7yyrMOWjyMthmsbu1CY3+ u2dA== X-Gm-Message-State: ACrzQf3QAMC4rbHThG6z2xHOnVAw9d5moHAhEW9CzHDyEojarcBV0Tcl 5IfkEx487hFOuaNbuE2bDpI= X-Received: by 2002:a05:6402:5107:b0:462:3014:3d73 with SMTP id m7-20020a056402510700b0046230143d73mr30160511edd.177.1667480480236; Thu, 03 Nov 2022 06:01:20 -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.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 06:01:20 -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 06/13] dt-bindings: iio: temperature: ltc2983: require custom sensor tables Date: Thu, 3 Nov 2022 15:00:34 +0200 Message-Id: <20221103130041.2153295-7-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?1748480392272709400?= X-GMAIL-MSGID: =?utf-8?q?1748480392272709400?= From: Cosmin Tanislav The driver will error out when a custom sensor type is used but a custom sensor table is not provided. Require it in the binding too. Signed-off-by: Cosmin Tanislav Reviewed-by: Rob Herring --- .../bindings/iio/temperature/adi,ltc2983.yaml | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml index 4f26b337c957..bbac5f5cfbb3 100644 --- a/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml +++ b/Documentation/devicetree/bindings/iio/temperature/adi,ltc2983.yaml @@ -130,6 +130,15 @@ patternProperties: - description: Voltage point in nV, signed. - description: Temperature point in uK. + allOf: + - if: + properties: + adi,sensor-type: + const: 9 + then: + required: + - adi,custom-thermocouple + "^diode@": type: object description: @@ -263,6 +272,15 @@ patternProperties: dependencies: adi,current-rotate: [ "adi,rsense-share" ] + allOf: + - if: + properties: + adi,sensor-type: + const: 18 + then: + required: + - adi,custom-rtd + "^thermistor@": type: object description: @@ -349,6 +367,22 @@ patternProperties: dependencies: adi,current-rotate: [ "adi,rsense-share" ] + allOf: + - if: + properties: + adi,sensor-type: + const: 26 + then: + required: + - adi,custom-steinhart + - if: + properties: + adi,sensor-type: + const: 27 + then: + required: + - adi,custom-thermistor + "^adc@": type: object description: Represents a channel which is being used as a direct adc.