Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp307766pxb; Mon, 16 Aug 2021 06:02:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJjp6ruyS/9KmRB0Im1xp9X8nr3P0LoVUhwwiZXaNrWdf7zjNXrqwIsf47gfeQfPGiv9OB X-Received: by 2002:a5d:8b85:: with SMTP id p5mr3155834iol.39.1629118919775; Mon, 16 Aug 2021 06:01:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629118919; cv=none; d=google.com; s=arc-20160816; b=r2RSxdxOQH06VIDKjCO6Eb7aRTBDeRzl1Vc98rjp+F4+CwQGx8E2gHPFgtSKn6KZtb d2a2UYuciYcdAPbkvU5fp7Rwq58jAzZUJDOd5kdk8E7J2tk5qIT+pIsXDx7xLUScrmAw 2Ov8EG+XzQDaZm7HX6OXbniV2i13YNKW1rxEVwJUtLfkAS9GuDdhiFObO8i1V0l1pD2S PXIRyCn4jH3hMNLn7E+pIlkH9Zr+L+4Tobmae5Ic4eY6KdhYlrBkk0saVZjBStzdWo8S jmDZYN0rnI7OXXJOfr9ojmNr7raeIO02+YfRFNBQ3izpttYpyKzC4KrcHX5yJVelaNBy lpRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:to:from:subject:cc :message-id:date:content-transfer-encoding:mime-version :dkim-signature; bh=G+0eo8uBciZZ75lMpCYVoliToSNojQPxAZ9Nw5b+SJ8=; b=c5UvGPgCpRO/jfiowAtu6uiVxOA3kE5nvFo72UNw0JO05T+2FpVm68Ln0pYLtseGKV MWQeUsPjqn8uM+lV/TpNolXi6WnHeiYbTUCSnO06lqjhyFRLh6fm0tctN/RCQqgwx9kU yWaZ3eGxDAAbscBoCs7ZM+ng1RxAPChmrKIBZPf9rOuqmnPIz9Asc5TJkJZGiW6NR28T QZ0tpiUf+EujzGlLNh36N3xP5C6ZISmNSgr90yiIJEppCWbuiqb4kt8EYY54drkO0Y9M nOao+dK9FS56fitxvuReIO/jiurb/TD3hPtl39TkOVbrPZFwgmFTHGGpDpbb0JwD7fX6 NQ0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=orP6XdoA; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e16si11751033ilm.91.2021.08.16.06.01.47; Mon, 16 Aug 2021 06:01:59 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=orP6XdoA; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230061AbhHPNAD (ORCPT + 99 others); Mon, 16 Aug 2021 09:00:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229593AbhHPNAC (ORCPT ); Mon, 16 Aug 2021 09:00:02 -0400 Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BDC8C061764; Mon, 16 Aug 2021 05:59:31 -0700 (PDT) Received: by mail-qv1-xf35.google.com with SMTP id js7so9185890qvb.4; Mon, 16 Aug 2021 05:59:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:content-transfer-encoding:date:message-id:cc:subject :from:to:references:in-reply-to; bh=G+0eo8uBciZZ75lMpCYVoliToSNojQPxAZ9Nw5b+SJ8=; b=orP6XdoARpEigMxUeWDxZuA9zCC+uW/v5mMLzo5b2heITGIGxlzoeu6hnKIlFujv7p fHN6eYzQlulZa3nKCEh5So3+w1cPm+8Zq/8gxJ9JaaP5HZzq+J/s4MFgc6EFvgScZbi4 UdlU/BjQsrD/b0OvK8Wtel+ysj8nqqigPrMXIK8AbsJc2ttcqZShas3sxXPizfrCqRP1 uxQ/++qlPaI3NdTlTQ2zxNkI6+J5ZwnlFk+7JUTKawhRoxHQ6lx0gZ3rG64iQ+LAxOXk K0E8mABcCXnoNWfvIohjWK8Ft0hzbxARQbqCc5vePZTuJjgFsUO1EgPjVci1yJC643p+ H79g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding:date :message-id:cc:subject:from:to:references:in-reply-to; bh=G+0eo8uBciZZ75lMpCYVoliToSNojQPxAZ9Nw5b+SJ8=; b=bA5oT8X1Dx83esLx79v1jnxfmKzcR77XULOjkkyaLEoOC8n5oDA743ctl9qnabk9A9 /sYu9SDTpgzQkIi7knvBx83Lro/tJtXxT0j0cGTYZomysbbHE0ZyuOMU+NHlC/wT6fZS 7qHHvqiiBhbMa5UZCVa2pDrk5GnNPXec8mM+ABuCvMrVupzO37TeiuumTh6nzGWSnA/j U5pnEQso7fIw5HN1tSaPtE9p852dDCL8qHO1TVYU2QGQxz+en+TXcmju7wgb+p472hF6 zAvl38E2sQn7i9YxwAAM81opH6D+UjPeiQGYswzo7wiLTAxZh7Vt0HGi8ZM7Dn+50LLz IEZw== X-Gm-Message-State: AOAM530caH+fPBJrubiXWniNrsjiS1FsYMGSMU3bvKnKgZjZsS4SXDyZ VLIPNs5yvkqrj05FYyoSw8g= X-Received: by 2002:ad4:48d2:: with SMTP id v18mr15775745qvx.41.1629118770536; Mon, 16 Aug 2021 05:59:30 -0700 (PDT) Received: from localhost (198-48-202-89.cpe.pppoe.ca. [198.48.202.89]) by smtp.gmail.com with ESMTPSA id n124sm6248823qkf.119.2021.08.16.05.59.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Aug 2021 05:59:29 -0700 (PDT) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 16 Aug 2021 08:59:28 -0400 Message-Id: Cc: "Lars-Peter Clausen" , "Michael Hennerich" , "Jonathan Cameron" , "Charles-Antoine Couret" , =?utf-8?q?Nuno_S=C3=A1?= , "Linux Kernel Mailing List" , "linux-iio" , "devicetree" , "Rob Herring" Subject: Re: [PATCH v6 0/5] AD7949 Fixes From: "Liam Beguin" To: "Andy Shevchenko" References: <20210815213309.2847711-1-liambeguin@gmail.com> In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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=3D51154= 5 > > [2] https://patchwork.kernel.org/project/linux-iio/list/?series=3D11697= 1&state=3D%2A&archive=3Dboth > > > > 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. 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