From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD38E17BCA; Sun, 24 Mar 2024 13:54:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711288482; cv=none; b=OeyAl4YW4L9NOrwF1kmnGff31NRnCt3gr5UBtFBnfllc/HtzgyK72dXYWcL6FZQRGBHWdQBJ2euYonQfVFd98nvQSZmeQ6n9IBs5vGr423lxWa0rfCO/sn9D4SdmUEkXkfGXcqmaDnT62N8lspgRQL5+6LXbBrV6ZJ/DFXyZue8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711288482; c=relaxed/simple; bh=L3eiBM3uq6W9B54PHA6++0VN5SYP8Sh0IVo8b/FkvIE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=hn5kGOcuMq9PSvQ60q+pysDqNiQ9lhPldRUac3RJT8H9S4hIOSgA7Pz6sWnqXmZpuaEIoStbHohcYCGsIj3lloS6pyDaUwuk1Zm1uTYGGpylBJGwniflLzkdg5iuUJKzwrPcVJFwEHLJIqJNoJe2rfBYTbPKY93tovagKXCwvlk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sfiiQY+T; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sfiiQY+T" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F4FAC433F1; Sun, 24 Mar 2024 13:54:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711288481; bh=L3eiBM3uq6W9B54PHA6++0VN5SYP8Sh0IVo8b/FkvIE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=sfiiQY+TsD3FaX0kL3X/fKuSvqjPE3/1wMNAfjfC/BqoJ5/mloZ6YrOYfOBQF0rFc R4NNlmOifgOI3sXL13QlHJh+Pwg/nL4WwcJz3Lr2XfiAcWGEEwBfe896Z1OwcR0r2m VPaf2gSw75Fw5G7pjqm0g2DPh0Rgi6UmfGatEhnLbl11vVGbFLz5W+OTtHyevrdPjO YoRJImLD9Hh28Dt25hWC4VK0ZV6ZPplCuEwMQhEhORzmrx5dBqHNgIQcledk8BOmYu Nj0kphW0O1KKo5wthVGBrbH6iYZcPIXPe5Ne40U/31yGoNadxnaMgfWYzsAy4KYGWc 4zxp3apamBadQ== Date: Sun, 24 Mar 2024 13:54:25 +0000 From: Jonathan Cameron To: Andrej Picej Cc: Krzysztof Kozlowski , haibo.chen@nxp.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, lars@metafoo.de, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, upstream@lists.phytec.de Subject: Re: [PATCH 2/2] dt-bindings: iio: adc: nxp,imx93-adc.yaml: Add calibration properties Message-ID: <20240324135425.229622d6@jic23-huawei> In-Reply-To: <1bbd4fdf-59c5-42b2-8698-95f402645c67@norik.com> References: <20240320100407.1639082-1-andrej.picej@norik.com> <20240320100407.1639082-3-andrej.picej@norik.com> <38637621-1611-4268-ae79-7ac93a72c5ee@linaro.org> <7e58bf96-3c38-467f-86b6-06ff5feedb31@linaro.org> <40e08a5e-e7e9-47c7-9102-24a2bbba67cf@norik.com> <1bbd4fdf-59c5-42b2-8698-95f402645c67@norik.com> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 22 Mar 2024 10:58:54 +0100 Andrej Picej wrote: > On 22. 03. 24 09:14, Krzysztof Kozlowski wrote: > > On 22/03/2024 08:39, Andrej Picej wrote: > >> On 20. 03. 24 13:15, Krzysztof Kozlowski wrote: > >>> On 20/03/2024 13:05, Andrej Picej wrote: > >>>> Hi Krzysztof, > >>>> > >>>> On 20. 03. 24 11:26, Krzysztof Kozlowski wrote: > >>>>> On 20/03/2024 11:04, Andrej Picej wrote: > >>>>>> Document calibration properties and how to set them. > >>>>> > >>>>> Bindings are before users. > >>>> > >>>> will change patch order when I send a v2. > >>>> > >>>>> > >>>>> Please use subject prefixes matching the subsystem. You can get them for > >>>>> example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory > >>>>> your patch is touching. > >>>>> There is no file extension in prefixes. > >>>> > >>>> So: dt-bindings: iio/adc: nxp,imx93-adc: Add calibration properties? > >>> > >>> Did you run the command I proposed? I don't see much of "/", but except > >>> that looks good. > >> > >> Ok noted. > >> > >>> > >>>> > >>>>> > >>>>>> > >>>>>> Signed-off-by: Andrej Picej > >>>>>> --- > >>>>>> .../bindings/iio/adc/nxp,imx93-adc.yaml | 15 +++++++++++++++ > >>>>>> 1 file changed, 15 insertions(+) > >>>>>> > >>>>>> diff --git a/Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml b/Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml > >>>>>> index dacc526dc695..64958be62a6a 100644 > >>>>>> --- a/Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml > >>>>>> +++ b/Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml > >>>>>> @@ -46,6 +46,21 @@ properties: > >>>>>> "#io-channel-cells": > >>>>>> const: 1 > >>>>>> > >>>>>> + nxp,calib-avg-en: > >>>>>> + description: > >>>>>> + Enable or disable averaging of calibration time. > >>>>>> + enum: [ 0, 1 ] > >>>>>> + > >>>>>> + nxp,calib-nr-samples: > >>>>>> + description: > >>>>>> + Selects the number of averaging samples to be used during calibration. > >>>>>> + enum: [ 16, 32, 128, 512 ] > >>>>>> + > >>>>>> + nxp,calib-t-samples: > >>>>>> + description: > >>>>>> + Specifies the sample time of calibration conversions. > >>>>>> + enum: [ 8, 16, 22, 32 ] > >>>>> > >>>>> No, use existing, generic properties. Open other bindings for this. > >>>> > >>>> You mean I should use generic properties for the ADC calibration > >>>> settings? Is there already something in place? Because as I understand > >>>> it, these calib-* values only effect the calibration process of the ADC. > >>> > >>> Please take a look at other devices and dtschema. We already have some > >>> properties for this... but maybe they cannot be used? > >>> > >> > >> I did look into other ADC devices, grep across iio/adc, adc bindings > >> folders and couldn't find anything closely related to what we are > >> looking for. Could you please point me to the properties that you think > >> should be used for this? > > > > Indeed, there are few device specific like qcom,avg-samples. We have > > though oversampling-ratio, settling-time-us and min-sample-time (which > > is not that good because does not use unit suffix). > > Ok, these are examples but I think I should not use them, since these > are i.MX93 ADC specific settings, which are used for configuration of > calibration process, and are not related to the standard conversion > process during runtime. Calibration process is the first step that > should be done after every power-on reset. > > > > > Then follow up questions: > > - nxp,calib-avg-en: Why is it a board-level decision? I would assume > > this depends on user choice and what kind of input you have (which could > > be board dependent or could be runtime decision). > > Not really sure I get your question, so please elaborate if I missed the > point. > This is a user choice, to enable or disable the averaging function in > calibration, but this is a board-level decision, probably relates on > external ADC regulators and input connections. The same options are used > for every ADC channel and this can not be a runtime decision, since > calibration is done before the ADC is even registered. I'll raise this question in reply to the cover letter or patch 1 where it is perhaps more appropriate, but I'd really like to know more about why these are useful at all. > > > - nxp,calib-t-samples: what does it mean? Time is expressed in time > > units, but there is nothing about units in the property name. > > > > You are right, basically this is "time" in cycles of AD_CLK. I should at > least add that to the property description. > > Best regards, > Andrej Picej 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C2279C47DD9 for ; Sun, 24 Mar 2024 13:55:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bkrLIMQTX/6p6m4QjeuSjsqoZlsZ4yNJKBaVdzYfk2s=; b=N2TBYgM99wvKId gD2WI1nAWtBhxg5NLUqQu6YBiMTmDP6DVMBajeFDZg6bnZ29zmChJ1wCGzvd0nCibz3HJa9vQ0TSF NHXnoA3vxKGI4IW3LsTyfuC/Z5T4Cvf71KFkqdeGpPTXIHnAt/jNC8RlKw5JUQ1AHpIVpC/6LxjpF dWlb/2+Y0AuDzZwKD63r7PDcWTnOc/dzPgYsFXK5My7yuVNS/MQ7A3ujL0ezNOfT00hXnU1QpYguU jxfptkmXyvmVCFkqZXmC7J1VbeoSSxG44ZEWlf6WbaiB/DZ5t7NUj6ZUUrNiCvO4NM6dnyBIiRz6u Nh4QNfDPqmjdUC7CRBVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1roOJC-0000000CefJ-37p6; Sun, 24 Mar 2024 13:54:46 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1roOJA-0000000Ceeg-26SA for linux-arm-kernel@lists.infradead.org; Sun, 24 Mar 2024 13:54:45 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 02DA360BE9; Sun, 24 Mar 2024 13:54:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F4FAC433F1; Sun, 24 Mar 2024 13:54:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711288481; bh=L3eiBM3uq6W9B54PHA6++0VN5SYP8Sh0IVo8b/FkvIE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=sfiiQY+TsD3FaX0kL3X/fKuSvqjPE3/1wMNAfjfC/BqoJ5/mloZ6YrOYfOBQF0rFc R4NNlmOifgOI3sXL13QlHJh+Pwg/nL4WwcJz3Lr2XfiAcWGEEwBfe896Z1OwcR0r2m VPaf2gSw75Fw5G7pjqm0g2DPh0Rgi6UmfGatEhnLbl11vVGbFLz5W+OTtHyevrdPjO YoRJImLD9Hh28Dt25hWC4VK0ZV6ZPplCuEwMQhEhORzmrx5dBqHNgIQcledk8BOmYu Nj0kphW0O1KKo5wthVGBrbH6iYZcPIXPe5Ne40U/31yGoNadxnaMgfWYzsAy4KYGWc 4zxp3apamBadQ== Date: Sun, 24 Mar 2024 13:54:25 +0000 From: Jonathan Cameron To: Andrej Picej Cc: Krzysztof Kozlowski , haibo.chen@nxp.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, lars@metafoo.de, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, upstream@lists.phytec.de Subject: Re: [PATCH 2/2] dt-bindings: iio: adc: nxp,imx93-adc.yaml: Add calibration properties Message-ID: <20240324135425.229622d6@jic23-huawei> In-Reply-To: <1bbd4fdf-59c5-42b2-8698-95f402645c67@norik.com> References: <20240320100407.1639082-1-andrej.picej@norik.com> <20240320100407.1639082-3-andrej.picej@norik.com> <38637621-1611-4268-ae79-7ac93a72c5ee@linaro.org> <7e58bf96-3c38-467f-86b6-06ff5feedb31@linaro.org> <40e08a5e-e7e9-47c7-9102-24a2bbba67cf@norik.com> <1bbd4fdf-59c5-42b2-8698-95f402645c67@norik.com> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240324_065444_674382_C7C85C29 X-CRM114-Status: GOOD ( 38.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 22 Mar 2024 10:58:54 +0100 Andrej Picej wrote: > On 22. 03. 24 09:14, Krzysztof Kozlowski wrote: > > On 22/03/2024 08:39, Andrej Picej wrote: > >> On 20. 03. 24 13:15, Krzysztof Kozlowski wrote: > >>> On 20/03/2024 13:05, Andrej Picej wrote: > >>>> Hi Krzysztof, > >>>> > >>>> On 20. 03. 24 11:26, Krzysztof Kozlowski wrote: > >>>>> On 20/03/2024 11:04, Andrej Picej wrote: > >>>>>> Document calibration properties and how to set them. > >>>>> > >>>>> Bindings are before users. > >>>> > >>>> will change patch order when I send a v2. > >>>> > >>>>> > >>>>> Please use subject prefixes matching the subsystem. You can get them for > >>>>> example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory > >>>>> your patch is touching. > >>>>> There is no file extension in prefixes. > >>>> > >>>> So: dt-bindings: iio/adc: nxp,imx93-adc: Add calibration properties? > >>> > >>> Did you run the command I proposed? I don't see much of "/", but except > >>> that looks good. > >> > >> Ok noted. > >> > >>> > >>>> > >>>>> > >>>>>> > >>>>>> Signed-off-by: Andrej Picej > >>>>>> --- > >>>>>> .../bindings/iio/adc/nxp,imx93-adc.yaml | 15 +++++++++++++++ > >>>>>> 1 file changed, 15 insertions(+) > >>>>>> > >>>>>> diff --git a/Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml b/Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml > >>>>>> index dacc526dc695..64958be62a6a 100644 > >>>>>> --- a/Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml > >>>>>> +++ b/Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml > >>>>>> @@ -46,6 +46,21 @@ properties: > >>>>>> "#io-channel-cells": > >>>>>> const: 1 > >>>>>> > >>>>>> + nxp,calib-avg-en: > >>>>>> + description: > >>>>>> + Enable or disable averaging of calibration time. > >>>>>> + enum: [ 0, 1 ] > >>>>>> + > >>>>>> + nxp,calib-nr-samples: > >>>>>> + description: > >>>>>> + Selects the number of averaging samples to be used during calibration. > >>>>>> + enum: [ 16, 32, 128, 512 ] > >>>>>> + > >>>>>> + nxp,calib-t-samples: > >>>>>> + description: > >>>>>> + Specifies the sample time of calibration conversions. > >>>>>> + enum: [ 8, 16, 22, 32 ] > >>>>> > >>>>> No, use existing, generic properties. Open other bindings for this. > >>>> > >>>> You mean I should use generic properties for the ADC calibration > >>>> settings? Is there already something in place? Because as I understand > >>>> it, these calib-* values only effect the calibration process of the ADC. > >>> > >>> Please take a look at other devices and dtschema. We already have some > >>> properties for this... but maybe they cannot be used? > >>> > >> > >> I did look into other ADC devices, grep across iio/adc, adc bindings > >> folders and couldn't find anything closely related to what we are > >> looking for. Could you please point me to the properties that you think > >> should be used for this? > > > > Indeed, there are few device specific like qcom,avg-samples. We have > > though oversampling-ratio, settling-time-us and min-sample-time (which > > is not that good because does not use unit suffix). > > Ok, these are examples but I think I should not use them, since these > are i.MX93 ADC specific settings, which are used for configuration of > calibration process, and are not related to the standard conversion > process during runtime. Calibration process is the first step that > should be done after every power-on reset. > > > > > Then follow up questions: > > - nxp,calib-avg-en: Why is it a board-level decision? I would assume > > this depends on user choice and what kind of input you have (which could > > be board dependent or could be runtime decision). > > Not really sure I get your question, so please elaborate if I missed the > point. > This is a user choice, to enable or disable the averaging function in > calibration, but this is a board-level decision, probably relates on > external ADC regulators and input connections. The same options are used > for every ADC channel and this can not be a runtime decision, since > calibration is done before the ADC is even registered. I'll raise this question in reply to the cover letter or patch 1 where it is perhaps more appropriate, but I'd really like to know more about why these are useful at all. > > > - nxp,calib-t-samples: what does it mean? Time is expressed in time > > units, but there is nothing about units in the property name. > > > > You are right, basically this is "time" in cycles of AD_CLK. I should at > least add that to the property description. > > Best regards, > Andrej Picej _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel