From patchwork Fri Jun 23 11:33:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 695969 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 985EFC0015E for ; Fri, 23 Jun 2023 11:33:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230262AbjFWLdh (ORCPT ); Fri, 23 Jun 2023 07:33:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231271AbjFWLdg (ORCPT ); Fri, 23 Jun 2023 07:33:36 -0400 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CDB3AC for ; Fri, 23 Jun 2023 04:33:35 -0700 (PDT) Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2b466066950so9295321fa.2 for ; Fri, 23 Jun 2023 04:33:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; t=1687520014; x=1690112014; 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=ItH4Pg7jxqco9mS/zUwcLIsvKjoWsb65kGsf9QvB3Qs=; b=UOJiSnXVBXDwtiw7hkY3RS495zKUvrRo3305RzR5u/Ea5HWCNy8TZb6T2DYp45BYc1 7Eli8yLXnwF7pmC4Cm253Z1VzQId5Xov5p6hhPu/OO5TXM5rg7pmqSzogWxG5pO0rDs3 RdqUvzIoMuw1zQDKcNCcu2d7pZKca19joPPcs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687520014; x=1690112014; 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=ItH4Pg7jxqco9mS/zUwcLIsvKjoWsb65kGsf9QvB3Qs=; b=i3eOSTFn7c/cJsL6sh1rVWM5XL3U4rLZh6R5v4mT7KyjpPThL/ALQvID4VjID7yuml 3ls/qS09e8EkgzExlobx9opbsTqvzDHrKnId2nrYOlsoIJO4S+ftlNe8mbWyaudYOjfo 73pgvslzfZN+t2jdWuamclr06nISSm13fZyjcnx+/Lr3oEpbRehzu+ZUreyZ5JUAURfm 3JKE/Ub5poJfjUUWLUbMRHu3vaQ2CPelTQl+Ogfw+QzjWoGKnlZULWYIPjhaOn4ontwN Ie55cCklS4ZwwxSf6rI/If+Caecdb2w+uxdnDvB/1GNPHNVBWNeZiOkj+46C9zyNE/dR pUVw== X-Gm-Message-State: AC+VfDxeORDXBCLCzbU/0IjB2wrKEGn4f+RPKuH8jUj69iKthoeD6JnY z2pAOv/eOsjj6cep/NdgqAw87Q== X-Google-Smtp-Source: ACHHUZ7qO4OC1EC6XyojwSPlB9l6hMdD419uyQ/ieDUyzzt51BVNpsgYqiGk9wLIVRh9KzDWj6AWow== X-Received: by 2002:a2e:961a:0:b0:2b5:7af9:f390 with SMTP id v26-20020a2e961a000000b002b57af9f390mr7940759ljh.47.1687520014000; Fri, 23 Jun 2023 04:33:34 -0700 (PDT) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id n10-20020a2e720a000000b002b471efb253sm1711605ljc.46.2023.06.23.04.33.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jun 2023 04:33:33 -0700 (PDT) From: Rasmus Villemoes To: Cosmin Tanislav , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, Rasmus Villemoes , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] dt-bindings: iio: ad74413r: add binding for digital input threshold Date: Fri, 23 Jun 2023 13:33:25 +0200 Message-Id: <20230623113327.1062170-2-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230623113327.1062170-1-linux@rasmusvillemoes.dk> References: <20230623113327.1062170-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Allow specifying the threshold for which the channels configured as digital input change state. Signed-off-by: Rasmus Villemoes --- Running dt_binding_check on this with a too small or large value in the example does give me an error, but the multipleOf does not seem to be enforced; the value 1234567 is not flagged. I don't know if that's expected (maybe I have too old versions of something). .../devicetree/bindings/iio/addac/adi,ad74413r.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml b/Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml index 590ea7936ad7..1f90ce3c7932 100644 --- a/Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml +++ b/Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml @@ -51,6 +51,14 @@ properties: Shunt (sense) resistor value in micro-Ohms. default: 100000000 + digital-input-threshold-microvolt: + description: + Comparator threshold used by the channels configured to use the + digital input function. + minimum: 500000 + maximum: 16000000 + multipleOf: 500000 + reset-gpios: maxItems: 1 @@ -143,6 +151,8 @@ examples: refin-supply = <&ad74413r_refin>; reset-gpios = <&gpio2 6 GPIO_ACTIVE_LOW>; + digital-input-threshold-microvolt = <4000000>; + channel@0 { reg = <0>;