Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1416946pxv; Fri, 23 Jul 2021 07:53:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+6BJaDO2167UdZREdNO8LwVO8SxheEKltRiVZ6O5hgoc405h3XyuSxV7L3Gf+V0xcq4kh X-Received: by 2002:a6b:fe03:: with SMTP id x3mr4219341ioh.120.1627052008471; Fri, 23 Jul 2021 07:53:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627052008; cv=none; d=google.com; s=arc-20160816; b=MkH1wQgJeobkQXr9v6kZPOxRBeXkXAbNLMOmFkiImMvrlD2RbhUKgjAYtYBbjtVARA mQ3iyAIrJeMvveQ54FQojGJ9wGMmqAOCZkY1kNKijkSiMYCS7uahfondz7ZmyuZw/cwV lvloF25VmJXdzRbJHnY2bllECC67fiB/+xK6IJLI1NL1mXwfoYIG9eCd3vf/W7XC2a4e jNo/fHITQcAizySmShNfArFVa3E7v+dkiqzzXImQjGW1EH6Vl5vV1uFnxG8yWM+Sc2d3 HR7FI9OG+oLH/miRkeBuv4xjWgXFwY0b+Ctqu8h+rvaJqrJx/30M+X00YPJomq6XxNBP hULw== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=wcbsLfPUtWD13PqBqcaG3+y+KKzj+fTtxgwGCHx4JRw=; b=0voK8Zo6/xh5JCmdC0veacCDkOm6ZY016p0iETV63CqIlCLqJ3MJvwAk2GE8mnOqLL xDilVxLsiNh9ZZMuC/quAhUSbt5t81Yz5HAKal+uRmL5u2mfJ7yU+HChsTqhh2Rnqzyo tfiSIzeLhBxKzbk9iRGDfHBpOUNlLs50K8iJDzWSNT3JzEpHTnHdVS365JIWlZNnZAVh oYrO1n2LbqHULr/8Vegc9pjR/ONcoHJyj1uEcQieTfUgaT2CfPqhqEIaVuSsD5IfLy3x ce6IsS9kM7qHvUdB7o+lK/P7nBfr7IxxPYiq66YKXAI6KpcunkL70MQ3kgTVyAp6h1zj 145A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a6si19006769ilv.81.2021.07.23.07.53.16; Fri, 23 Jul 2021 07:53:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235456AbhGWOLj convert rfc822-to-8bit (ORCPT + 99 others); Fri, 23 Jul 2021 10:11:39 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3466 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235351AbhGWOLh (ORCPT ); Fri, 23 Jul 2021 10:11:37 -0400 Received: from fraeml702-chm.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4GWX9n6026z6G9Fh; Fri, 23 Jul 2021 22:43:09 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by fraeml702-chm.china.huawei.com (10.206.15.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Fri, 23 Jul 2021 16:52:06 +0200 Received: from localhost (10.210.170.238) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Fri, 23 Jul 2021 15:52:05 +0100 Date: Fri, 23 Jul 2021 15:51:41 +0100 From: Jonathan Cameron To: Billy Tsai CC: , , , , , , , , , , , , Subject: Re: [v2 2/8] dt-bindings: iio: adc: Binding ast2600 adc. Message-ID: <20210723155141.000039ee@Huawei.com> In-Reply-To: <20210723081621.29477-3-billy_tsai@aspeedtech.com> References: <20210723081621.29477-1-billy_tsai@aspeedtech.com> <20210723081621.29477-3-billy_tsai@aspeedtech.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Originating-IP: [10.210.170.238] X-ClientProxiedBy: lhreml704-chm.china.huawei.com (10.201.108.53) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 23 Jul 2021 16:16:15 +0800 Billy Tsai wrote: > This patch add more description about aspeed adc and add two property > for ast2600: > - vref: used to configure reference voltage. > - battery-sensing: used to enable battery sensing mode for last channel. > > Signed-off-by: Billy Tsai Hi Billy, A few comments inline. Thanks, Jonathan > --- > .../bindings/iio/adc/aspeed,adc.yaml | 28 +++++++++++++++++-- > 1 file changed, 26 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed,adc.yaml b/Documentation/devicetree/bindings/iio/adc/aspeed,adc.yaml > index 23f3da1ffca3..a562a7fbc30c 100644 > --- a/Documentation/devicetree/bindings/iio/adc/aspeed,adc.yaml > +++ b/Documentation/devicetree/bindings/iio/adc/aspeed,adc.yaml > @@ -10,14 +10,26 @@ maintainers: > - Joel Stanley > > description: I think you need a | after description if you want the formatting to be maintained (otherwise it will undo the line breaks). > - This device is a 10-bit converter for 16 voltage channels. All inputs are > - single ended. > + • 10-bits resolution for 16 voltage channels. > + At ast2400/ast2500 the device has only one engine with 16 voltage channels. > + At ast2600 the device split into two individual engine and each contains 8 voltage channels. Please wrap lines at 80 chars unless it badly hurts readability. engines > + • Channel scanning can be non-continuous. > + • Programmable ADC clock frequency. > + • Programmable upper and lower bound for each channels. I would use threshold rather than bound. A bound restricts the value, and I think this is measuring it? > + • Interrupt when larger or less than bounds for each channels. > + • Support hysteresis for each channels. > + • Buildin a compensating method. Built-in > + Additional feature at ast2600 of ast2600 > + • Internal or External reference voltage. > + • Support 2 Internal reference voltage 1.2v or 2.5v. > + • Integrate dividing circuit for battery sensing. > > properties: > compatible: > enum: > - aspeed,ast2400-adc > - aspeed,ast2500-adc > + - aspeed,ast2600-adc > > reg: > maxItems: 1 > @@ -33,6 +45,18 @@ properties: > "#io-channel-cells": > const: 1 > > + vref: > + minItems: 900 > + maxItems: 2700 > + default: 2500 > + description: > + ADC Reference voltage in millivolts. I'm not clear from this description. Is this describing an externally connected voltage reference? If so it needs to be done as a regulator. If it's a classic high precision reference, the dts can just use a fixed regulator. > + > + battery-sensing: > + type: boolean > + description: > + Inform the driver that last channel will be used to sensor battery. This isn't (I think?) a standard dt binding, so it needs a manufacturer prefix. aspeed,battery-sensing > + > required: > - compatible > - reg