Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1199280lqo; Sat, 11 May 2024 11:41:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUhdNibD1nOiOcVUQB5mTFifWpCqOQmq1jXY5Pd45frTZ0VtpyUa/6zlhZDaTw8+spJV5lU2aGYkJPEVtI7rrhMyCtFq7grmdTJnERblg== X-Google-Smtp-Source: AGHT+IHrTMrNzkhPXC1iRYUtxD62MngQcy91ypOBGgfOI42DfermPuag9ZElJT9+4HF1+aK3KAD3 X-Received: by 2002:a50:a69c:0:b0:572:32e4:daca with SMTP id 4fb4d7f45d1cf-5734d5cfab6mr3766251a12.25.1715452894391; Sat, 11 May 2024 11:41:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715452894; cv=pass; d=google.com; s=arc-20160816; b=Uy88DyH0lPpKqplYRQSurCf1BHIRXxMhnNV79IJsNhAJONb25yImExvX2Josxx3H/7 OdbiAAZjv8TclSTCaRd3xLkEJihWIkcSgAaZ8b/gEStMla/u5EeF3UrjNXxhC8/dXqRl l4x1LK4v70855mO3VtutlUKIppdhGc/8bUg3tt30NZ0bCrMiikt3zowffoksFU7Ib4mG MnhLcNmn4l3mU8z2y6NKphTpGEUYTljv1UhLL+vqGQaMCsT67/A4lI/WV22/AMODWL/J terxvEbQbsUl1q+v7SX0fiSzlANo5NB8NnmqxGUt3ZGVCrGTGpASxyAgX7ERCDJlMDYk IHkQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=dBbqjiAUkd73PlK8VV9pGC4FnSlljTALl1NxrlDsjME=; fh=G5sIrfL2/3yf35XZRKfujw4cSB83C4O6jlqzLUXEf80=; b=JQGz8GUPaP3U3MuubugYGHKknqgjn/ffX/lg9INhHswrCkipU8flhst4I/8PtLM9TH qB6oaec6k+NenPb57+MxuvPG2swf/lT7Rk5O89qxkP9sTGFV8AngSI4MsH0G1+oKOLYy 60PdRmURV7B78b6fC1PZcgTPRA4Mew+wxbHChzCZNs8ZgxX7mOzEX4AIIwOC2+GGKCYP Ixj0r6jcwyxgsqRyAofuvvBKVOvDHvhM6WSWNQZY7dzXUyHMOpYlNHYmImBxbp2nw7Mo /8FJdALO5uKyRyB8Sgw49Rb+WjAiomgHz8vY4WL8nqHib3fS/bSzD0gnkea1HBssh3zz Ff4g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b="P5ifuh/R"; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-176681-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176681-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c2d5aa2si3286707a12.240.2024.05.11.11.41.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 May 2024 11:41:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176681-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b="P5ifuh/R"; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-176681-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176681-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 227661F2194C for ; Sat, 11 May 2024 18:41:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C069D366; Sat, 11 May 2024 18:41:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="P5ifuh/R" Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1590418EBF for ; Sat, 11 May 2024 18:41:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715452885; cv=none; b=ZGsnm/YDMr8daejuxIC5P8dnYw0Xf4TkIJpdwx2h7fc5Oz7CsRpwtkJnG1SjJFm4wJle5zsq1l/BtroxiiYMmY2pZCkbEpWGd2CmTYC5fi0wA2DntKNNjpkN3oG9sDOstMPp6p2QOz0OqAibqp+JHbKN92CEK8XTZsALhz2jZHI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715452885; c=relaxed/simple; bh=G7PBUQYX86PTVKHgYsiAhpQ9G51BoCbvNoBIlqfcN94=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=ir8GSKxbXbqTspvSyhMCG7VJF9rxxQH85afiy3k3VYAroZ4yE8/Ps+gi/tsISlX0BEgt2fR4e990XofB8PokykoCfDFYDZDrxjNxFx6quzJ+Di+NoXiXtKqJ2803mNrkTlmi1uUv6yzcf2d2FRbtGxDFb6yxIji/8mbNkSVQHT4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=P5ifuh/R; arc=none smtp.client-ip=209.85.208.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2e3e18c24c1so30545521fa.1 for ; Sat, 11 May 2024 11:41:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1715452881; x=1716057681; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=dBbqjiAUkd73PlK8VV9pGC4FnSlljTALl1NxrlDsjME=; b=P5ifuh/RAGkkYb3MkvGj86DcdV0ZiW9sGPDI4AkDnWZ8S7a/ryJG71fMZy0QrhdTvB pnaBzEDEBm/I9u3BmsSKJVN0S+yjBi+QJ+BSpP90K2qkSeEJzZmUj8o1++EFHdu06+PJ NiWuRZ/cwO3EuZ0fpDrQeTrhCrIWzjX9xjKuE+XM4V23YG4HqFxhgidKrv+vWzaG20ks 42omJPctXufYTL3wL2pDOPZn3gdiD0/u7f+hgxV7C3aCODQPZP93Jr6gxzXgjl6qdLKj RLD8939UDnCCzAUAbjzs1QYUmoNbwu8pbLhmRo3bn92qY9MLpvAw9nuM4f4B0/TJHVAW ACiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715452881; x=1716057681; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dBbqjiAUkd73PlK8VV9pGC4FnSlljTALl1NxrlDsjME=; b=XWEPdIQwqiaX+92qWFhLNgLRpW9y2zbiFfgNCZli+4rv7mBl4En55dNQxRClHLJu2p WOCA+NrunMTLgCuh3sNd+wQw6flaY2/dyIN0bLmDDgZ5EPtNfD+aAjtMBOxK+uX7Ca3/ ZiGImfSsDg4PGQU+tdEkKA2KFx2gdmCGjeHKN3xfM+oXPWEJyeoTLXE7dvra03gaG3eP +l8jwQB6Kz0Qk9JgaNmxbSu+dzcYNJk+g9KKocsi30Iq7CKGOeDUUBcv2QW6P2+Qonq4 TsLGi4NXQnR/xYv9eKjN+v5IzGuUrM4rz1ibD2eD6fvap6ERiylNBvmVanzIDgKuPiDn mOpQ== X-Forwarded-Encrypted: i=1; AJvYcCXSPvu0I4VK7KcDb/ua90LAxg+zDEmAsFWHOn4e9m2Hp3+0rDidlmCsGM964dYL3PGX1b4xy/LF7SqFk7PNStEBWf5K8yfkc4I5PPJd X-Gm-Message-State: AOJu0YwMsnV/gC7nCnez8pPvetdhwgPP8dgzMQRDeI66tvRI/5I+K/RW IJErGFYGTSlbqshx7q8Y4fDGew83Q885tsl2QimXonwx0jAK6Y9DP3ChaigZlylwwpq8KMd6SgL azuzfaX4U6Fc4lfRMnu7R6TzKRNH2VNTnoofnqA== X-Received: by 2002:a2e:8896:0:b0:2e5:15d0:511c with SMTP id 38308e7fff4ca-2e52028da88mr37305651fa.40.1715452881036; Sat, 11 May 2024 11:41:21 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240510-dlech-mainline-spi-engine-offload-2-v2-0-8707a870c435@baylibre.com> <20240510-dlech-mainline-spi-engine-offload-2-v2-8-8707a870c435@baylibre.com> <20240511175832.6c2f6517@jic23-huawei> In-Reply-To: <20240511175832.6c2f6517@jic23-huawei> From: David Lechner Date: Sat, 11 May 2024 13:41:09 -0500 Message-ID: Subject: Re: [PATCH RFC v2 8/8] iio: adc: ad7944: add support for SPI offload To: Jonathan Cameron Cc: Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , =?UTF-8?B?TnVubyBTw6E=?= , Michael Hennerich , Lars-Peter Clausen , David Jander , Martin Sperl , linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, May 11, 2024 at 11:58=E2=80=AFAM Jonathan Cameron wrote: > > On Fri, 10 May 2024 19:44:31 -0500 > David Lechner wrote: > > > This adds support for SPI offload to the ad7944 driver. This allows > > reading data at the max sample rate of 2.5 MSPS. > > > > Signed-off-by: David Lechner > > --- > > > > v2 changes: > > > > In the previous version, there was a new separate driver for the PWM > > trigger and DMA hardware buffer. This was deemed too complex so they > > are moved into the ad7944 driver. > > > > It has also been reworked to accommodate for the changes described in > > the other patches. > > > > RFC: This isn't very polished yet, just FYI. A few things to sort out: > > > > Rather than making the buffer either triggered buffer or hardware buffe= r, > > I'm considering allowing both, e.g. buffer0 will always be the triggere= d > > buffer and buffer1 will will be the hardware buffer if connected to a S= PI > > controller with offload support, otherwise buffer1 is absent. But since > > multiple buffers haven't been used much so far, more investigation is > > needed to see how that would work in practice. If we do that though, th= en > > we would always have the sampling_frequency attribute though even thoug= h > > it only applies to one buffer. > > Why would someone who has this nice IP in the path want the conventional > triggered buffer? I'm not against the two buffer option, but I'd like to= know > the reasoning not to just provide the hardware buffer if this SPI offload > is available. > > I can conjecture reasons but would like you to write them out for me :) > This feels like if someone has paid for the expensive hardware they proba= bly > only want the best performance. > For me, it was more of a question of if we need to keep the userspace interface consistent between both with or without offload support. But if you are happy with it this way where we have only one or the other, it is less work for me. :-)