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 X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FB1CC47092 for ; Tue, 1 Jun 2021 16:07:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 629CA6136E for ; Tue, 1 Jun 2021 16:07:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234050AbhFAQJS (ORCPT ); Tue, 1 Jun 2021 12:09:18 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3123 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234212AbhFAQJR (ORCPT ); Tue, 1 Jun 2021 12:09:17 -0400 Received: from fraeml737-chm.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4FvcDw5znPz6M4Ps; Tue, 1 Jun 2021 23:55:12 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by fraeml737-chm.china.huawei.com (10.206.15.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 1 Jun 2021 18:07:34 +0200 Received: from localhost (10.52.121.71) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 1 Jun 2021 17:07:33 +0100 Date: Tue, 1 Jun 2021 17:07:29 +0100 From: Jonathan Cameron To: Liam Beguin CC: Peter Rosin , , , , , , , Subject: Re: [PATCH v1 9/9] dt-bindings: iio: afe: add binding for temperature-sense-amplifier Message-ID: <20210601170729.000066b1@Huawei.com> In-Reply-To: <20210601170251.00002ddf@Huawei.com> References: <20210530005917.20953-1-liambeguin@gmail.com> <20210530005917.20953-10-liambeguin@gmail.com> <0286de71-1b04-0956-be4e-f38573c6fea2@axentia.se> <20210601170251.00002ddf@Huawei.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="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.52.121.71] X-ClientProxiedBy: lhreml738-chm.china.huawei.com (10.201.108.188) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Tue, 1 Jun 2021 17:02:51 +0100 Jonathan Cameron wrote: > On Mon, 31 May 2021 10:03:23 -0400 > "Liam Beguin" wrote: > > > Hi Peter, > > > > On Mon May 31, 2021 at 3:32 AM EDT, Peter Rosin wrote: > > > Hi! > > > > > > On 2021-05-30 02:59, Liam Beguin wrote: > > > > From: Liam Beguin > > > > > > > > An ADC is often used to measure other quantities indirectly. This > > > > binding describe one cases, the measurement of a temperature through a > > > > voltage sense amplifier such as the LTC2997. > > > > > > > > Signed-off-by: Liam Beguin > > > > > > What's the significant difference between this and the RTD binding? Does > > > not both simply scale/offset a voltage to a temperature? > > I'm lost: what RTD binding? Ignore this email - I was reading the series backwards and thought we were talking about a preexisting binding. > > > > > > > > The way I looked at it was one binding per sensor type (resistance > > driven, current driven, and voltage driven). > > > > Thinking about it more, these three bindings could be factorized into > > one if the user is required to enter parameters "by hand". > > Don't. They are effectively different types of devices and we just end > up with a more complex binding if we try to cover them all. Ignore that as well. If the bindings combine fairly easily it is nice to do so, but be careful not to throw too many things in together and make it very hard to write the binding. However, I'm not keen on entirely generic bindings and would like the channel type at least to come from the compatible. > > There is an argument to go the other way and actually have bindings for > individual temperature sensors like the LTC2997. Then the parameters > become a driver problem rather than one for the binding. > > Jonathan > > > > > > These could become something like: > > - sense-gain-mult > > - sense-gain-div > > - sense-offset > > > > I like the idea of having the "datasheet parameters" in the devicetree, > > but this would be a lot more versatile. > > > > What do you think? > > > > Cheers, > > Liam > > > > > Cheers, > > > Peter > > >