Message ID | 20221111143921.742194-3-linux@rasmusvillemoes.dk |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp784539wru; Fri, 11 Nov 2022 06:52:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf4O2pYRE63nWJBfChsKrklghNSl5TyU9dDMBUaztogHr0hjz4p8WrTrZSLwQjRPB4RfpmRx X-Received: by 2002:a05:6402:3715:b0:462:32bf:613a with SMTP id ek21-20020a056402371500b0046232bf613amr1716140edb.78.1668178353858; Fri, 11 Nov 2022 06:52:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668178353; cv=none; d=google.com; s=arc-20160816; b=U7R1C3msVmbb5oNLKp4m2ECRvgLa4GBp1/gU6LmbXtjlfmK8w6jPKZqhgdEaYaQfEQ nyGKnrnm+J65nhMtWMl3lw4ZQjzXRo1ELfdxVxs1zSEt0wi2c8orlHFw8NoZ+TL8KArQ O9sOnTnd3ZwLnVmZyFPCZ4nsdxUAmgcLiDmvJURCfqt9NadDOcATR/GbszoQPsiT8RES AGxF8/42kS596LA3Uo0krq2Xmy136tzMC5KDZ5jAln7v40Vb71toP4omuYdBKICmSkti gHghY9N6WjkBgdGdZW0TVHzD4fQvAE1eg0WIm+MEaXmJ+gcbJdhmr/PIAeiCWCg+wvLK rLIQ== 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=2lxqynGN1zb3SeT8QyXA1+0ZwfAUv0vy1HULeEAsp+0=; b=CP6gSeQKWKKNf3ImLCGKbUCQZLDLZG1cjHzOCRjhIIrP1BYu3+S/mh0nCrAxmfrltn FJV27ewfx8k0yHPd5UsQiltIho4hENERUHQ+wEYHDwiWAOOGOJ5hVF86z7c4Ybtb6Bnu 1PycgQfi/ToM8w/4X0n7k9Yn4bfxknqssEVu/385Vxp4vKlWAp93GxWptllTPW1ddZ0A A7ZfZFTQSW3uK6jeMHdPrEX8QZu50co8DAo7Oi8cGACFpnZ6RLkkuOOE7E+VakXGlmZm ULkQ0deIx0Phm0eoQF5yQIIWhNnnh30Z7up/tgi93kh76AJTUbYPl/7pBd03LNY+EpFC xX4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=BY47XsVm; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l3-20020a170906794300b007aed286a00dsi672919ejo.814.2022.11.11.06.52.09; Fri, 11 Nov 2022 06:52:33 -0800 (PST) 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=@rasmusvillemoes.dk header.s=google header.b=BY47XsVm; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234734AbiKKOkG (ORCPT <rfc822;winker.wchi@gmail.com> + 99 others); Fri, 11 Nov 2022 09:40:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234654AbiKKOji (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 11 Nov 2022 09:39:38 -0500 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D60D63BB7 for <linux-kernel@vger.kernel.org>; Fri, 11 Nov 2022 06:39:28 -0800 (PST) Received: by mail-ej1-x635.google.com with SMTP id n12so12941956eja.11 for <linux-kernel@vger.kernel.org>; Fri, 11 Nov 2022 06:39:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; 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=2lxqynGN1zb3SeT8QyXA1+0ZwfAUv0vy1HULeEAsp+0=; b=BY47XsVmK51QERSuv9y2eWZAjkN5DPflYrv9P/kAP1nvo563DsVXnrBG2y65QznhVM SJJXYc3oBd5budwHsKVFz1tIAxtTFQHFuRjvG2Qow3zmfnhU4p6vdjvcEJwBKzhZFQac supnDkrsavwNMIaDcwLsbcfXTXa6D3sSBou3Y= 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=2lxqynGN1zb3SeT8QyXA1+0ZwfAUv0vy1HULeEAsp+0=; b=uXPduAlC9CAbVgpx1xS51WedVg+gkUZ/QF03PhzMZ8s0/wt4stvLrnsZRY24piDcrM jdhlaOEW/vcSL8PF0GzDrmIUg6y0o0h6vo1nsZdI99luM6ViHc/aCOrH9aFnfJM3a9KF M5fEnpN6lVYmSIshG//yUBjJpXFKCkjL4Hlm5EE3mkPvYvI1JZg3AOtxXFMRRdMwOyi/ 0jyc6xecXAYcZ7yRRhcQotHDYjGhE9MetvSbeajNem9QWMg+Kfh72wyrh5g/oGJHk+bB Z2gfgkG6aKdhcoufdyuzjsiStmMbBrbjfur5SmzxTLQ3ByzLXBmire6hXKQZGUqlJ2WE TQzg== X-Gm-Message-State: ANoB5pmmOuglyphidh1QgpaDs9RLWYJEYdmFHOuXowniC/8nLGKWfCKm 0mgOHe6xSEu5lp6qVoCR20ow34mC3h5wyCwHEwk= X-Received: by 2002:a17:906:8cf:b0:7ae:59dd:e3f4 with SMTP id o15-20020a17090608cf00b007ae59dde3f4mr2017438eje.755.1668177567004; Fri, 11 Nov 2022 06:39:27 -0800 (PST) Received: from prevas-ravi.tritech.se ([80.208.71.65]) by smtp.gmail.com with ESMTPSA id jt4-20020a170906dfc400b007a1d4944d45sm945886ejc.142.2022.11.11.06.39.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 06:39:26 -0800 (PST) From: Rasmus Villemoes <linux@rasmusvillemoes.dk> To: Cosmin Tanislav <cosmin.tanislav@analog.com>, Lars-Peter Clausen <lars@metafoo.de>, Michael Hennerich <Michael.Hennerich@analog.com>, Jonathan Cameron <jic23@kernel.org> Cc: devicetree@vger.kernel.org, Rob Herring <robh+dt@kernel.org>, Rasmus Villemoes <linux@rasmusvillemoes.dk>, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] dt-bindings: iio: ad74413r: make refin-supply optional Date: Fri, 11 Nov 2022 15:39:18 +0100 Message-Id: <20221111143921.742194-3-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221111143921.742194-1-linux@rasmusvillemoes.dk> References: <20221111143921.742194-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749211785598641092?= X-GMAIL-MSGID: =?utf-8?q?1749211785598641092?= |
Series |
iio: addac: ad74413r: various fixups
|
|
Commit Message
Rasmus Villemoes
Nov. 11, 2022, 2:39 p.m. UTC
The ad74412r/ad74413r has an internal 2.5V reference output, which (by
tying the REFOUT pin to the REFIN pin) can be used in lieu of an
external 2.5V input reference. So stop marking refin-supply as
required.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml | 1 -
1 file changed, 1 deletion(-)
Comments
On Fri, 11 Nov 2022 15:39:18 +0100 Rasmus Villemoes <linux@rasmusvillemoes.dk> wrote: > The ad74412r/ad74413r has an internal 2.5V reference output, which (by > tying the REFOUT pin to the REFIN pin) can be used in lieu of an > external 2.5V input reference. So stop marking refin-supply as > required. > > Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Interesting corner case. Given we have no way of knowing if the wiring has REFOUT connected to REFIN I see two ways we should fix this. 1) Just have any DT doing this provide a fixed regulator. 2) Have the REFOUT supported as an actual regulator - in theory it might be wired to other devices. This might get a little interesting ordering wise as we'll want to register the regulator before we try to consume it in the same driver. I'm also not 100% sure there are no other issues in a driver providing and consuming the same regulator. I'm not keen to just assume lack of regulator means the chip is wired like this. Would be a different question if this was just setting an internal mux to use the regulator without external loop back being needed. Jonathan > --- > Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml b/Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml > index 03bb90a7f4f8..e954d5ae4f4f 100644 > --- a/Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml > +++ b/Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml > @@ -56,7 +56,6 @@ required: > - reg > - spi-max-frequency > - spi-cpol > - - refin-supply > > additionalProperties: false >
On 12/11/2022 17.54, Jonathan Cameron wrote: > On Fri, 11 Nov 2022 15:39:18 +0100 > Rasmus Villemoes <linux@rasmusvillemoes.dk> wrote: > >> The ad74412r/ad74413r has an internal 2.5V reference output, which (by >> tying the REFOUT pin to the REFIN pin) can be used in lieu of an >> external 2.5V input reference. So stop marking refin-supply as >> required. >> >> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> > > > Interesting corner case. Given we have no way of knowing if the > wiring has REFOUT connected to REFIN I see two ways we should fix this. > > 1) Just have any DT doing this provide a fixed regulator. > 2) Have the REFOUT supported as an actual regulator - in theory it might be > wired to other devices. This might get a little interesting ordering > wise as we'll want to register the regulator before we try to consume > it in the same driver. I'm also not 100% sure there are no other issues > in a driver providing and consuming the same regulator. Hm, I don't like the idea of exposing REFOUT as a real regulator. As you write, there's gonna be interesting chicken-and-egg problems, and I also don't think it can actually deliver any meaningful current, i.e. it can't really (and shouldn't) be used for supplying other peripherals. A third option is to have a boolean property to explicitly indicate that "yes, we're using refout as refin", and then make the requirement in the schema be "refin-supply XOR refout-as-refin". But I think the simplest is (1), I will just add a fixed-regulator with a suitable comment in my .dts, and patches 2,3 can be ignored. Thanks, Rasmus
diff --git a/Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml b/Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml index 03bb90a7f4f8..e954d5ae4f4f 100644 --- a/Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml +++ b/Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml @@ -56,7 +56,6 @@ required: - reg - spi-max-frequency - spi-cpol - - refin-supply additionalProperties: false