Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp2201009rwb; Sun, 4 Sep 2022 10:21:38 -0700 (PDT) X-Google-Smtp-Source: AA6agR7Mha+d0K4VlGqVftHPNZQZdrLPJgzimJtNARscv150S0KRxyGFM9PeECcVpgyjbgCKJ0Qr X-Received: by 2002:a17:906:8475:b0:740:2574:1f04 with SMTP id hx21-20020a170906847500b0074025741f04mr11217086ejc.394.1662312098465; Sun, 04 Sep 2022 10:21:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662312098; cv=none; d=google.com; s=arc-20160816; b=wbeIi9Y6sXv167Hu6Ud39Zd+65Gs8f5vki846O+f1boUDooLDgigv8vS0rMV1dKIvc tk8R8j6A8SSGfSuUtVHu6M9JJWkuF3+5Bfv+zCA3SIeJKngPoPvUE1qD/XpZTzunpvkU f/TUdcoocbMaweLd+aGvQ5NnLBaFa9+MnhJ3GvK3s7NE9TNxYzVTUBH2wIWNqewBt9sI Q+fMlvQhD1JxjkGi2j4jucgzIai2JPYMjaQHGe0uACXYvyXPtZVcyrkrTuB+8X6qJRUH hELKRKl2YSkfRyfiv/LSbZ59Nfwf8idciMwpHUgOajweycxi+buFbGEmYXgZNBXOOcNH gDYw== 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 :dkim-signature; bh=fsZS2uBfe5zTu5BO9PNFZgAF8t+6ztNaGjIijxJIq7c=; b=cyvAKpVKCrKRK1p2cYLU2v4sNAtUtXd8cZ6mU8l27/9qut0ijqTwYOp8WMymntfJqD 7hWOnx7Xm/W9r+GuIjKJx6biGPk5b4OiJsQpDW5nJWxGjyQF/K7qqmPDIz9tXbeXpfu5 PX82oYSylhb6eMClINNBa7Ju0MVZEI9rULu3xWvRnZK5v2JgOqc827qolxfMlYgaRAMa nhy94kLgPM72ZN6ETzpUzsbNHzQpnNAHkSa5oyhRmFYgjcKdYkot1/nh1S8eRpv2UnBe tk73S7VUc4hvH1esMtKJbRx2ZzqTAB+40c4yH3tACIwVMi9oSFXmAA/Ih/98Jwiw22Gh XDww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=r6SEjWAg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kl6-20020a170907994600b0072b3a874867si5441719ejc.874.2022.09.04.10.21.13; Sun, 04 Sep 2022 10:21:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=r6SEjWAg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S234803AbiIDRDL (ORCPT + 99 others); Sun, 4 Sep 2022 13:03:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229627AbiIDRDJ (ORCPT ); Sun, 4 Sep 2022 13:03:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C35CE2B273; Sun, 4 Sep 2022 10:03:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5C5C960FC4; Sun, 4 Sep 2022 17:03:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A857C433C1; Sun, 4 Sep 2022 17:03:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662310987; bh=EcXPP6Y1c06oVCwaXq53q7wHe38vVS+n7PCI/+LSJlU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=r6SEjWAgDGaLrHQguYgL/Gh3uSkNLN/+SuAki6ImXRJ4SxfKHpNg0XOK1i24G1EiX yiFzDzS7NvW0fg61wG+3JDJVZUqAZm2D5S7fXS2RSHcpnwvR1XcAMeE4jdcDFUa7De ICIceCPpLVgapZLRKtdMVFNHrOKa9VzbQk9y3+cav6RdMoQzzIrc9HZHwGBFTpmEXw bG6fRSrov3nOnvYIeMkAVJo0qsFdMrp6EaXyuoZPG3EwE2D9PEzRbcSUPEW5/pSeZ8 twHu53h8YbvX2VdyqWp/6g1eHIzCU8OsB4+1kaGECTi+Bnj/h7qiDV2+N5484zxi3l TKUbU2eptjHOw== Date: Sun, 4 Sep 2022 17:29:00 +0100 From: Jonathan Cameron To: Vincent Whitchurch Cc: kernel , "lars@metafoo.de" , Axel Jonsson , "linux-iio@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 2/2] iio: adc: mcp320x: add triggered buffer support Message-ID: <20220904172900.099ed1d0@jic23-huawei> In-Reply-To: References: <20220824104002.2749075-1-vincent.whitchurch@axis.com> <20220824104002.2749075-3-vincent.whitchurch@axis.com> <20220828182430.533bf8e0@jic23-huawei> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 31 Aug 2022 09:47:50 +0200 Vincent Whitchurch wrote: > On Sun, Aug 28, 2022 at 07:24:30PM +0200, Jonathan Cameron wrote: > > On Wed, 24 Aug 2022 12:40:02 +0200 > > Vincent Whitchurch wrote: > > > Add support for triggered buffers. Just read the channels in a loop to > > > keep things simple. > > > > Just curious, but what other options are there? A quick datasheet scroll > > through didn't seem to suggest you can overlap setup of next read with > > reading out the previous (common on SPI ADCs). > > You're right that the hardware doesn't support any special method to > read out multiple channels; I can mention that in the commit message. > But I think you could construct a spi_message which a bunch of > spi_transfers which toggle the CS appropriately between them to read out > multiple channels in one go? (Note that the variants have different > data formats, and many of the variants only have one channel.) That might be a little more efficient on a suitably advanced SPI controller, or where the overhead of jumping between drivers is large, but in many cases it won't save that much. Would need an experiment on a platform someone cares about to decide if it is worthwhile. Jonathan