Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp308624imu; Thu, 8 Nov 2018 08:37:28 -0800 (PST) X-Google-Smtp-Source: AJdET5e365r+vRERnZvS/FwYeRe2Aew6BtM2urnfXsxpTAfggN/4aMNUQbm/+G+sCJeTPjBJDwlj X-Received: by 2002:a17:902:30f:: with SMTP id 15-v6mr5240820pld.155.1541695048642; Thu, 08 Nov 2018 08:37:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541695048; cv=none; d=google.com; s=arc-20160816; b=C9B55CPdpY0L6T2eC+5DenmGl+mkLzwKcdSLKr60uiJqfwbAopVtTizumo8BgtAqZS 6ORdQFcVmVTG3YbRAxYdj1N9OWw0Xrp617MO9HHdPQue5t9wfo1jBmsoZu+v9Ie4demj LC5yIWWirld0oewbRMklw9eK7wtxLyINZrc/LMtXd0TI38++F+epw+taYBjNWxe9K6Dq VPQtNhGHba3feT57W3PdjzDycS1Rvmd0dsDD/VtNYdvwgzyh0VCzD0jQEZ4tFKSAMJav PnuTH2Z44lvQlUVI8IsBDG4pjXkO77QtRm4cC5OKCEwrmzA3zNRmvKDkPDg71cpWIHhV 1LeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=T2a2ji9zBwFdzjgJBGjpKuBNufJsEcJjmO1sXKllU9M=; b=dTQody6gV8rqb1MB0GMGFGJ4AbGf+p0alwyvHi99g6rNe+iI8as1e13nDmyltfhqrO ezV15JofmBTjFNSazxL1gdhsikRZaZifJNnYU/5do4YL0BJ8zWd4WLaCWQbhmdrEFw9O wV0hlL3S5mpezXv5EIsP4TDxvk5TW8zKaXHtMwCs2bAldtg8Xl2O3BU18Fp3GnSJNv/1 4pdOvWSzE74pJeHCOp4DZTkqx69MmgJDozzniuXFM33Jqek/nsBAD7E3boS8qxvR2khv GaTx/DNvlLs4NeOMzZ30Njh7w+KqJk039ZglSgG1SRW36/8cN5wlxQ19WB9+JP5BaKeJ cBcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IWxU5qvP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a62-v6si4844837pfb.266.2018.11.08.08.37.12; Thu, 08 Nov 2018 08:37:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IWxU5qvP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726915AbeKICLR (ORCPT + 99 others); Thu, 8 Nov 2018 21:11:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:36082 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726421AbeKICLR (ORCPT ); Thu, 8 Nov 2018 21:11:17 -0500 Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1A2B920883; Thu, 8 Nov 2018 16:34:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541694899; bh=KSZIXB3aOIiCbL+xaMf82z67Mc86QzXOT9zlcuh7K34=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=IWxU5qvPvJ6XDSdcB+PbjL/R8C47SlcoRf0l+3QKU4OWDL1+j7A0d3LZS1CaA5Rlp PVSDpRHWlDYYfnVkh8acAgfOryCnytk2Ff63ySDgVzLNkJloo6+S0I+P+pOSNeOfuA SdmBPeNii4iRmp/sYsTKLydTU3GMkEfyIQXJfFSQ= Received: by mail-qk1-f170.google.com with SMTP id e4so27524830qkh.6; Thu, 08 Nov 2018 08:34:59 -0800 (PST) X-Gm-Message-State: AGRZ1gJUTpJv1T2bpa/JX9hd4b6JGl5w5fRLmxW5k7RoYx07jNBaoV2D kugGTD1skLAA4l/P+FQmARrSu90nuuM2AINe2g== X-Received: by 2002:ae9:ef14:: with SMTP id d20mr4857472qkg.147.1541694898286; Thu, 08 Nov 2018 08:34:58 -0800 (PST) MIME-Version: 1.0 References: <1540831111-3040-1-git-send-email-stefan.popa@analog.com> <20181103121606.2fc461ec@archlinux> <1541687328.2091.2.camel@analog.com> In-Reply-To: <1541687328.2091.2.camel@analog.com> From: Rob Herring Date: Thu, 8 Nov 2018 10:34:45 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 2/3] iio: adc: Add ad7124 support To: StefanSerban.Popa@analog.com Cc: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald , Michael Hennerich , Greg Kroah-Hartman , linux-iio@vger.kernel.org, "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 8, 2018 at 9:02 AM Popa, Stefan Serban wrote: > > On Sb, 2018-11-03 at 12:16 +0000, Jonathan Cameron wrote: > > On Mon, 29 Oct 2018 18:38:31 +0200 > > Stefan Popa wrote: > > > > > > > > The ad7124-4 and ad7124-8 are a family of 4 and 8 channel sigma-delta > > > ADCs > > > with 24-bit precision and reference. > > > > > > Three power modes are available which in turn affect the output data > > > rate: > > > * Full power: 9.38 SPS to 19,200 SPS > > > * Mid power: 2.34 SPS to 4800 SPS > > > * Low power: 1.17 SPS to 2400 SPS > > > > > > The ad7124-4 can be configured to have four differential inputs, while > > > ad7124-8 can have 8. Moreover, ad7124 also supports per channel > > > configuration. Each configuration consists of gain, reference source, > > > output data rate and bipolar/unipolar configuration. > > > > > > Datasheets: > > > Link: http://www.analog.com/media/en/technical-documentation/data-sheet > > > s/AD7124-4.pdf > > > Link: http://www.analog.com/media/en/technical-documentation/data-sheet > > > s/ad7124-8.pdf > > > > > > Signed-off-by: Stefan Popa > > Hi Stefan, > > > > The discussion around the DT binding has gotten me looking at bit > > more closely at that for this version. > > > > Some most comments in that section. Also a really minor ordering issue > > in > > remove which I'd just have fixed if we weren't going around again for > > the binding. > > > > Main binding thing is I don't think the odr value belongs in DT. > > Gain is more marginal (unless the part can actually be damaged by > > a wrong value - which I hope it can't!). I'm not that fussed > > as there are definitely reasons to specify a default scale to > > cover the reasonable range on a pin. > > > > Thanks, > > > > Jonathan > > Hi Jonathan, > > Thank you for the review! So, how should I proceed? > > First, we need an adc.txt file where "bipolar" and something like "diff- > channels" should be documented. Should the file be placed under > Documentation/devicetree/bindings/iio/adc? Yes. > Regarding the "odr-hz" property, it totally makes sense to remove it from > the DT. How about the "gain"? Should we leave it in the DT and also add the > possibility to be configured from user space? Look at other bindings. I think there are others having gain. If not, then it probably should only be user space configurable. If so, then can it be a common property too. Rob