Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2291855rwd; Sun, 28 May 2023 12:13:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6frfyBJBFZAW6cRn7tSaWpLOiErey4zIJpMjyP4ICx52TT+ucJfVK1MbeGlYM4T9WvB5yn X-Received: by 2002:a17:90a:4a95:b0:256:21a9:8f82 with SMTP id f21-20020a17090a4a9500b0025621a98f82mr8716266pjh.16.1685301234074; Sun, 28 May 2023 12:13:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685301234; cv=none; d=google.com; s=arc-20160816; b=t4IDiCIVv2OWwiQ+V9GZiR/yln3OrS+wyjceKzV3a52fxhsT+2YYrYHLAT8ZSmQhnu 4Cv1xYIYTiI+ufh7ymDF5PohsavpVIpWtWos6381UMagXMjaOaOCldrRRj/hEsVId/Hf 2UFoIjQU6gggWVVAlLxxeaBC5ehmiezVMf0r1qq7hUM60YE6OQKJYDhw5kmmSZpgNjvB O/dZJ3vVaQjZ8vcWF+e1GNu2Og6b3ObmR3FvMqgKmCtD8j0/51R5/P3eG5f/hEvN8R7z 8nu6sU2ysFXD+TCSxZ2bsRIRyYp5D+07VItIjBaTMnRdG4Z+CW2YC3YQiMND2zKzFnSW Ocxg== 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:subject:cc:to:from:date :dkim-signature; bh=Y/9+rsd0DAB/SMF3dXw1B6ygEi1AHxX4sTccrupmkwI=; b=VQv+d3Vw3g7N9Ii/Ap9r+oq++gi8W9jj5jvteO5i7XbTcjnrAA7eIAke+LwEavMR5I Zwe0XRFtkoi3HhkS/2hQK9+xrRbT0eypcBlnKYYbCHd/ajSvYCoqCfavw3T0M+Bk6886 PuMoTy+s2V4UYosTUIVoHH27I8TC/BRyuKZH36/H6igFTgH4L04e2rhLS15Be/tcP9RW CwnFaTg3+LoAHbmVRWBMRQexHZgDhMvJCg7iHwc7JMxaNhJL/ix1ygBp5ZbT9JsN8ByA 1Y5k4j51CCYgjrImOYYrg4VOXmwrSsR2sNfZgnRd33azvcOzlPmlvnI1D7wHqCL9l5FG FSJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CwxRSZPI; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ml7-20020a17090b360700b0024e036ec731si2806020pjb.36.2023.05.28.12.13.41; Sun, 28 May 2023 12:13:54 -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=@kernel.org header.s=k20201202 header.b=CwxRSZPI; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229586AbjE1S4p (ORCPT + 99 others); Sun, 28 May 2023 14:56:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbjE1S4o (ORCPT ); Sun, 28 May 2023 14:56:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24409BE; Sun, 28 May 2023 11:56:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B547C61328; Sun, 28 May 2023 18:56:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3E89C433D2; Sun, 28 May 2023 18:56:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685300202; bh=JDYChD/vhzIWiUOnUxUBVKV4YxXceKDOuf90kByVAbU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=CwxRSZPI7c3dF4UAgivHhpR9UekVEr825YEoDm+Bs0009aLIX+M4+Qcg84u8NfE3g xZIRiCmHSrWigmW2XGjuaSeGUchxtZqWtIG0/4t2ddIvhrVJFT/MmEC8DaNFInr20X sgatrvSK7LZGeDaWFoe/o9re4lqSoMJqrXg+7ikKbja8bQ3NxT0f6MLCUIEIm6s6Yd 1iGPlN/LOz1snMFMZ7kAOP8+AKnBS43oatYXQHli2hqBj1gx+ZD6t00qdFitxwCLp3 Hd9YQjFYOSajlZa6vDDDEfSmYly3BFFuXYIfNqHianfW6jiSu588bC79RAW+X5EcQR VRFaiy0MOR8RA== Date: Sun, 28 May 2023 20:13:01 +0100 From: Jonathan Cameron To: Rasmus Villemoes Cc: Nuno =?UTF-8?B?U8Oh?= , Lars-Peter Clausen , Michael Hennerich , Cosmin Tanislav , Jonathan Cameron , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iio: addac: ad74413: don't set DIN_SINK for functions other than digital input Message-ID: <20230528201301.68b31bca@jic23-huawei> In-Reply-To: <822d2741-32ff-fc73-28a5-25575ab3cc52@rasmusvillemoes.dk> References: <20230503105042.453755-1-linux@rasmusvillemoes.dk> <27fe41e402ea0d6ef42aa0ac80aa3d1488862cd8.camel@gmail.com> <6fcf4997-9d88-7e86-70f7-52f9d296bc6e@rasmusvillemoes.dk> <20230506191636.3cff4b24@jic23-huawei> <822d2741-32ff-fc73-28a5-25575ab3cc52@rasmusvillemoes.dk> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Mon, 22 May 2023 10:44:11 +0200 Rasmus Villemoes wrote: > On 06/05/2023 20.16, Jonathan Cameron wrote: > > On Thu, 4 May 2023 12:08:53 +0200 > > Rasmus Villemoes wrote: > > =20 > >> On 04/05/2023 09.28, Nuno S=C3=A1 wrote: =20 >=20 > >>> Can anyone have a working device by specifying that dt parameter > >>> on a non digital channel (or expect something from having that parame= ter set)? > >>> Or the only effect is to actually have some functions misbehaving? = =20 > >> > >> The data sheet doesn't say that the DIN_SINK should have any effect for > >> other functions, so I'm pretty sure it's only the latter: some functio= ns > >> misbehave. > >> =20 > >>> On the driver side, if it's never right to have > >>> these settings together, then the patch is valid since if someone has= this, his > >>> configuration is broken anyways (maybe that's also a valid point for = the > >>> bindings)... =20 > >> > >> Yes, I do believe that it's a broken description (whether or not the > >> bindings specify that), and drivers don't need to go out of their way = to > >> validate or fixup such brokenness. But in this particular case, there's > >> really no extra burden on the driver to not put garbage in DIN_SINK wh= en > >> a not-digital-input function has been chosen (the patch is a two-liner > >> with 'git show -w'). =20 > >=20 > > If we can tighten the DT binding to rule out something that should not = be > > set than that would be good. Tightening bindings is fine - we don't mi= nd > > validation of bindings failing on peoples DTs as long as we didn't 'bre= ak' > > them actually working. =20 >=20 > Well, I'm afraid I don't have any idea how to spell that constraint in > the yaml-language (help appreciated). Lots of examples in tree of this sort of thing. Look for a=20 : false with something other than additionalProperties or unevaluatedProper= ties Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml for example. In short you have an allOf block containing a list of rules, one of which is a match on particular conditions to set particular properties to 'false' which means that any attempt to have them set when that condition is met results in an error from the dts checking scripts. >=20 > And I assume a dt binding update would be a separate patch anyway, so > could you please consider applying this patch? Fair enough. Applied to the fixes-togreg branch of iio.git. Thanks, Jonathan >=20 > Thanks, > Rasmus >=20