From mboxrd@z Thu Jan 1 00:00:00 1970 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 24D74EB64DA for ; Sun, 2 Jul 2023 09:37:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229605AbjGBJhB (ORCPT ); Sun, 2 Jul 2023 05:37:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbjGBJhA (ORCPT ); Sun, 2 Jul 2023 05:37:00 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 039AFE4D; Sun, 2 Jul 2023 02:36:59 -0700 (PDT) Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Qv3lv0XcTz6D9CW; Sun, 2 Jul 2023 17:34:03 +0800 (CST) Received: from localhost (10.48.51.211) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Sun, 2 Jul 2023 10:36:52 +0100 Date: Sun, 2 Jul 2023 17:36:48 +0800 From: Jonathan Cameron To: Krzysztof Kozlowski CC: Rasmus Villemoes , Rob Herring , Conor Dooley , Cosmin Tanislav , Lars-Peter Clausen , "Michael Hennerich" , Jonathan Cameron , Krzysztof Kozlowski , Conor Dooley , , , , Linus Walleij , Bartosz Golaszewski Subject: Re: [PATCH 1/2] dt-bindings: iio: ad74413r: add binding for digital input threshold Message-ID: <20230702173648.00006a1d@Huawei.com> In-Reply-To: <075c8d01-5788-a3c4-44e0-36cb9318fc6a@linaro.org> References: <20230623113327.1062170-1-linux@rasmusvillemoes.dk> <20230623113327.1062170-2-linux@rasmusvillemoes.dk> <20230623-casket-outer-2c9d2a0c4795@spud> <20230623215731.GB1216324-robh@kernel.org> <8176d552-9829-5442-3ce9-805744b8389e@rasmusvillemoes.dk> <075c8d01-5788-a3c4-44e0-36cb9318fc6a@linaro.org> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.48.51.211] X-ClientProxiedBy: lhrpeml500003.china.huawei.com (7.191.162.67) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Mon, 26 Jun 2023 10:29:22 +0200 Krzysztof Kozlowski wrote: > On 26/06/2023 10:15, Rasmus Villemoes wrote: > > On 23/06/2023 23.57, Rob Herring wrote: > >> On Fri, Jun 23, 2023 at 05:44:50PM +0100, Conor Dooley wrote: > >>> On Fri, Jun 23, 2023 at 01:33:25PM +0200, Rasmus Villemoes wrote: > >>>> 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: > >>> > >>> Should this not have an adi vendor prefix, similar to > >>> "adi,digital-input-threshold-mode-fixed"? > >> > >> Yes. > > > > OK. But I'm not really sure what the rules are for when such a prefix > > must be added, so some guidance would be appreciated. There's > > > > - DO use a vendor prefix on device specific property names. Consider if > > properties could be common among devices of the same class. > > > > And my thinking was that a threshold for when a digital input should > > count as high/low would be a rather generic thing, so not particularly > > device specific. > > Then find some more users of it. The hi8435 could make use of this, but it currently doesn't get these thresholds from DT (despite there being a reasonable argument that these should be characteristics of the board wiring etc) but rather from userspace controls. Might well be something in gpio drivers? Linus / Bartosz, any of the input gpio devices really threshold detectors? If so is there any precedence for a DT binding to set the threshold? > > > > > Also, this very binding has a shunt-resistor-micro-ohms, and the > > individual channels have a drive-strength-microamp (granted, that latter > > one is a recent one of mine and may have slipped through review?). I can > > certainly understand that when a property specifies a raw value to put > > into some register (or field), that's very specific to that chip (or > > small family of chips) - the adi,ch-func properties fall into that category. > > Best regards, > Krzysztof >