Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1668136rdd; Thu, 11 Jan 2024 06:08:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IFO0lmNcw0qA9qospaNF8Nl2gDiW3HhGbrbzp0VJ+zhVXq3nuW9t4jBX5qvz+rQ3GwMpXVo X-Received: by 2002:a05:6e02:1ba2:b0:35f:ef57:56ad with SMTP id n2-20020a056e021ba200b0035fef5756admr1404412ili.16.1704982123581; Thu, 11 Jan 2024 06:08:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704982123; cv=none; d=google.com; s=arc-20160816; b=hwtqP3NhsIi6TU3ln+yF+nKye1LgymfRx8bF588BCBydZL2UCA7G1TMg4Tv05Tbhlj 6MWE0MgK2vR3vihQagvJDBJ1EXgJgIXJPgbzZaanJrGEeqe4vyezgm+EUubAltX/iVWQ DSlxIFbLFtBVNPVyTXX4K/WBgZuT1IZTajuulLcrViWfHKj+ZkKbb+c5XyvEKGQOJgl/ 25bzMvIawtQWnLLCv38qDAkZ0PR3RW3L/q459wScTA8C+06RkSZpFuQvBxFazoxMfijx NyLrWhgBmaYoZ02xpWlxiAqDzQGTq0No5h7ZXMFqSzN/PVDBum/VTRO5gxi02HizeTp0 vV+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=WoJC8tdnDZuFg5WsFgtASovnc1Tl99lnT/+ICbRlVwA=; fh=BMR2MpuWw1qiTUoKC7tw0z3ehRIoq66MT7hE74WO1Zc=; b=AjVNOn4wW7lY8TFYLaBWuGCl/iaC/tihDj8ijo2yp9VvW5oOOmUKsZU37k2LngexD3 4xgJ8lDs3eP+fqsJcoOKrA899ZJCTeP81vVnyA5SH4hKztFDuSKW5kWQEP35nX0wK/g0 5h+0LRBniq7NyxX7CkehhVe/JWwXD6bfHWfFZ2BNl/AaOWSq2rW9GG5N9quByRfZH621 CjXgeHAIv/GGglsBNnIFsNcWYpGJXnnnP9dmLkajM0yvjz2LnHv282eEySjoy3tYLVRv tLdS3c89Zo5Gg6/jlUt+StVeTj3VmW7QbmZrjWmG9q+nRwYpBrnYjP0asKGvIhriyKgx PELw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=G+oqQ9qM; spf=pass (google.com: domain of linux-kernel+bounces-23698-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23698-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id h16-20020a63c010000000b005ced390a1a6si1184629pgg.624.2024.01.11.06.08.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 06:08:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23698-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=G+oqQ9qM; spf=pass (google.com: domain of linux-kernel+bounces-23698-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23698-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 6CA89B21194 for ; Thu, 11 Jan 2024 14:08:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 800A03C491; Thu, 11 Jan 2024 14:08:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="G+oqQ9qM" Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (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 3B0FE3B187; Thu, 11 Jan 2024 14:08:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a29a4f610b1so579799966b.3; Thu, 11 Jan 2024 06:08:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704982101; x=1705586901; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=WoJC8tdnDZuFg5WsFgtASovnc1Tl99lnT/+ICbRlVwA=; b=G+oqQ9qMsSnvIG2xsqqlMDBNGN7bdvOXAudCaiFcF3RpwRSoxNq57VZbT679SZpcwR mQv+YkKVIUqDbVaE8jtHv9n/4PHgC41jMsf0wCoGVMeo2ct2W0n2vjr9EM009tMmnIwx +h+Z9FEu4BTwuGnUfHtsNPL+ZED5QhH+44yoTObj9tw2ypKQnAS5upt0OInlEbqwPEqP GE3NR1H8yVgVwcw0MCG+XlPOGHD6FyenNZe91OPM9dWIXA6nkf+rSTAd6VuSu2y+ntjG W98YktW1L4PcwcX0nk0Afl/n8IShAeeR2RHALiMAKMnCS0vsFTHCRIooIgSzN+xcLwf+ gsVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704982101; x=1705586901; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=WoJC8tdnDZuFg5WsFgtASovnc1Tl99lnT/+ICbRlVwA=; b=Kqjem/diqyHz2gSf7TRvAoAgbs4eJ7uNtxqT0l9oNpFXtppZe+VlRAoDc1r9iVAgRw gpm95X8PPacIUTN87MwhVOS/fo/9qTFrM1BAbePd9YRw5j7ECZXujNVJim2nDLh5EN/G BSwsTXQ/qOVCFJK319bAq4IasgGki+kQrmeB2GjPhPlLzQ79zelNwHt3dWNLACDzTK9y dJ07MHiRHWlwZ4kCWSRX87BR4nnglBG5V+a4JecAAN+U5R5WBnmNF0L+OPptiuA/lioy T5Bt5k4BQcMay9I8c8aVV+EFYdA+Yy++swWnSx7b4P0+VkioXRSaK/TVjXGygIMuBsZ+ 89Uw== X-Gm-Message-State: AOJu0Yyq8Y0FQmdpv6HcL7dVxzS1aC39CnmABkeykkLUzB3QA4IeAmvf u1Z260p8U4dnZ6m/7hwbpb0= X-Received: by 2002:a17:906:c08c:b0:a28:bf58:756d with SMTP id f12-20020a170906c08c00b00a28bf58756dmr554052ejz.128.1704982101155; Thu, 11 Jan 2024 06:08:21 -0800 (PST) Received: from ?IPv6:2003:f6:ef1b:2000:944c:cbc7:1e1c:2c47? (p200300f6ef1b2000944ccbc71e1c2c47.dip0.t-ipconnect.de. [2003:f6:ef1b:2000:944c:cbc7:1e1c:2c47]) by smtp.gmail.com with ESMTPSA id ov18-20020a170906fc1200b00a2a184687dasm618425ejb.31.2024.01.11.06.08.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 06:08:20 -0800 (PST) Message-ID: <5b62d742fa789e9860781b6f5f1fda4f583b0e5b.camel@gmail.com> Subject: Re: [PATCH 01/13] spi: add core support for controllers with offload capabilities From: Nuno =?ISO-8859-1?Q?S=E1?= To: Mark Brown Cc: David Lechner , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michael Hennerich , Nuno =?ISO-8859-1?Q?S=E1?= , Frank Rowand , Thierry Reding , Uwe =?ISO-8859-1?Q?Kleine-K=F6nig?= , Jonathan Corbet , linux-spi@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 11 Jan 2024 15:11:32 +0100 In-Reply-To: References: <20240109-axi-spi-engine-series-3-v1-0-e42c6a986580@baylibre.com> <20240109-axi-spi-engine-series-3-v1-1-e42c6a986580@baylibre.com> <0c0b1954825dc174cab48060e96ddadadc18aefd.camel@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Thu, 2024-01-11 at 13:33 +0000, Mark Brown wrote: > On Thu, Jan 11, 2024 at 09:49:08AM +0100, Nuno S=C3=A1 wrote: > > On Wed, 2024-01-10 at 13:49 -0600, David Lechner wrote: >=20 > > > =C2=A0=C2=A0=C2=A0 /* in probe() */ > > > =C2=A0=C2=A0=C2=A0 offload =3D spi_offload_get(spi, 0); >=20 > > On top of what Mark already stated, and as we already discussed offline= , I > > personally don't like this provider - consumer interface for the offloa= d. > > The > > first thing is that this is taking into account the possibility of havi= ng > > multiple offload cores. While the FGPA core was designed with that in m= ind, > > we > > don't really have any design using multiple offloads in one spi engine > > (always > > one). Hence this is all pretty much untested. >=20 > I tend to agree that we shouldn't be exposing this to SPI device drivers > however we will want to keep track of if the unit is busy, and designing > it to cope with multiple offloads does seem like sensible future > proofing.=C2=A0 There's also the possibility that one engine might be abl= e to Fair enough. But wouldn't a simple DT integer property (handled by the spi = core) to identify the offload index be easier for SPI device drivers? We could st= ill have dedicated interfaces for checking if the unit is busy or not... The po= int is that we would not need an explicit get() from SPI drivers. I'm of course assuming that one spi device can only be connected to one eng= ine which seems reasonable to me. - Nuno S=C3=A1