Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2917287pxb; Sun, 29 Aug 2021 07:36:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMv0OJ1ytU/+iyL3geAJ+JkXb1DA+F8duxaZjGBJOPylWl0txTcOGsVd8HsvypXzVf/CdT X-Received: by 2002:a92:c846:: with SMTP id b6mr13524361ilq.84.1630247804226; Sun, 29 Aug 2021 07:36:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630247804; cv=none; d=google.com; s=arc-20160816; b=lDb5zT1nhB6LJp18hkAqNcBrA6qztyEtO34jy6v1QR4S7l/sxGGC6cu5UorewovGTE 3trVyrs/rTZ3fpDZnBLuq6JHqdbTuJJfo8OxCHqodwJKOtxgmCfNlkc7OGL8hcwU6ONU JZnvYNrmJXKnQBHiRQEmQWiTICUevdhZJMjxQE/Q1aqf5XSlQAGJihnTaibwA4eMtczW ll+kVGmp2Cx8UwdOtkEw3P6/2kw94gMYRloDJ2ry4BD9M7fCP8UpFY0JobIE0l9o5O02 D41YooZqqk+yG9NAIwL4sS50gI7UNUYLdwedVj6jtlV8xKbvA8W0eezF8m0FYrezH/Km K6Dw== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=q/b7tJPv7ShZGS+LdcTe3oLy0jpt5TopLy9YFzB7NlY=; b=TWJaOJWnu6ZBjcNEPNi+I1sQEwzcFmyDt8EUlQip/NQbLZu7Mn59Q/ht9wDov0Fr8T Q21QchGXT+LHqfvMc8ANjmpVje5Z9wqimGOnASBdwL3rxs5nPArITItSujWVw6l3gN/+ gGko7/fzpk4CQezDhpO9rO2EWz8pMz/ThALNFJwjkeFPuEYlbc7Hh7QDC/j1lNxQtN+1 Paa5fDQssKIILe4dDZ8lklT+MmniLiNPRetHfk3oS9x9T2qPcxjCYSNbRjjImO+8u9cz 8UIxa3vyXn+9ugJxLvVnzJAbjetrJ2ufIbuPHlKA3JP2XcgsQjRTWuvTw9uTtz8IUMx3 1UMQ== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p14si13799303iov.81.2021.08.29.07.36.32; Sun, 29 Aug 2021 07:36:44 -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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235398AbhH2Og1 (ORCPT + 99 others); Sun, 29 Aug 2021 10:36:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:47622 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229824AbhH2Og0 (ORCPT ); Sun, 29 Aug 2021 10:36:26 -0400 Received: from jic23-huawei (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8D28C6023D; Sun, 29 Aug 2021 14:35:30 +0000 (UTC) Date: Sun, 29 Aug 2021 15:38:45 +0100 From: Jonathan Cameron To: "Liam Beguin" Cc: "Andy Shevchenko" , "Lars-Peter Clausen" , "Michael Hennerich" , "Charles-Antoine Couret" , Nuno =?UTF-8?B?U8Oh?= , "Linux Kernel Mailing List" , "linux-iio" , "devicetree" , "Rob Herring" Subject: Re: [PATCH v6 0/5] AD7949 Fixes Message-ID: <20210829153845.0c7eda30@jic23-huawei> In-Reply-To: References: <20210815213309.2847711-1-liambeguin@gmail.com> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 16 Aug 2021 08:59:28 -0400 "Liam Beguin" wrote: > On Mon Aug 16, 2021 at 4:08 AM EDT, Andy Shevchenko wrote: > > On Mon, Aug 16, 2021 at 12:35 AM Liam Beguin > > wrote: > > > > > > While working on another series[1] I ran into issues where my SPI > > > controller would fail to handle 14-bit and 16-bit SPI messages. This > > > addresses that issue and adds support for selecting a different voltage > > > reference source from the devicetree. > > > > > > v1 was base on a series[2] that seems to not have made it all the way, > > > and was tested on an ad7689. > > > > > > v6 drops support for per channel vref selection. > > > After switching the voltage reference, readings take a little while to > > > stabilize, invalidating consecutive readings. > > > > > > This could've been addressed by adding more dummy cycles at the expense > > > of speed, but discussing the issue with colleagues more involved in > > > hardware design, it turns out these circuits are usually designed with a > > > single vref in mind. > > > > > > [1] https://patchwork.kernel.org/project/linux-iio/list/?series=511545 > > > [2] https://patchwork.kernel.org/project/linux-iio/list/?series=116971&state=%2A&archive=both > > > > > > Changes since v5: > > > - rename defines: s/AD7949_CFG_BIT_/AD7949_CFG_MASK_/g > > > - rename AD7949_MASK_TOTAL to match other defines > > > > > - make vref selection global instead of per channel, and update > > > dt-bindings > > Hi Andy, > > > > > Same as per v5: is it a hardware limitation? > > It's unclear to me what happened here. > > I tried to provide more details in the last paragraph above. > > After switching the voltage reference, readings take a little while to > stabilize invalidating consecutive readings. > > One option was to add more dummy cycles, but in addition to making > things slower it was brought to my attention that this kind of circuit > is usually designed with a single vref in mind. > > For those reasons and because I didn't have an explicit need for it, I > decided to drop that part. It's not 'impossible' to add it back in later if someone needs it, but until then this works for me. Series applied with tweaks as described in individual patch replies. Thanks, Jonathan > > Liam > > > > > > - reword commits 2/5, 3/5, and 4/5 > > > - move bits_per_word configuration to struct spi_device, and switch to > > > spi_{read,write}. > > > > -- > > With Best Regards, > > Andy Shevchenko >