Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp480134rbb; Sat, 24 Feb 2024 08:36:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWArRkuc+Nfs1uHVJ+iQZ5kbfpa+x/SCFXpIroNE2I6HtVuFzOyQCDdVCmwBkz6YZf1BzyFUT4uxrgFQu8u6wnU64cTCm9jqCNgE1TbDA== X-Google-Smtp-Source: AGHT+IHipBKrCQ1Nd+nXdt9eCjeEUk2L4vafPrz9ITZe/xmomRhDm5GnACuFucHmxS0B4ZSckxzm X-Received: by 2002:a05:620a:25d1:b0:787:8ae4:7a9c with SMTP id y17-20020a05620a25d100b007878ae47a9cmr4669306qko.30.1708792606728; Sat, 24 Feb 2024 08:36:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708792606; cv=pass; d=google.com; s=arc-20160816; b=MEFKrJdJNKRmq/1Ea/Q51+rNjmR7edNbJM/pn6ksH8gmFHdGqcYB/nXEpOyXMl5NiD Kv5g6avFHeOiL9aPju+Wp37qaiNkUFNxrddtyVlcPf919/IqGZAL0cFYECq663mWhnOB VY/MZXZBcNYtLQIHcCRGH4peGVkXSqNlohCEloCCFqJSCm87/T5wyAm/jsX7kxv3emuO hmEmgGSr1ZoDpDDOjKE2HGAZBeKbboCRKUagfUWOXbUhq+7mbQq8FpJ/cNXcv/HzJNnm xiuAT0XkjWCQUdoao+fJDg3O3BiK+KgDyoyKF/ABxwmjc8A7r+Wgx9Yqbbf6guxC/kBh 4FQQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=OWUEgz0nE8akQ8qirnI/DRYLRiv6GEmC8VXecdGwgFI=; fh=0SBz7LQoz+6fMkZAghNrxIEY6VR1spWbLQG0oPyoM5w=; b=Fz72JaAYaXC1M9hviPbPhCIOT+1I8thkJkhNLYQxuh7nYzr+7Sd/z/WPSF3oZzDenQ y0xuBN7kSR7T/4g5zJwfPoaa6Szg4AKBzq2dyEdKtz9I4IAAVePwao0yO732IZcrWFu/ HF9TOegiBZuWY7MVRG9dbHGu5NuMhBhorRczkadEEoFDWJhJZGBcZ9+3QwMYea54cItb pX5AO4aY3ZHYghTvaGu3n8bR4BClkhesuXXIJNB8Dzg5CqzY87yhx5Pol1P1zsT+GTq/ y2nHm9/HmhadQPi5oelc4qlljbuTVZ494DFPe1weCroO9wfYZjdrbSgu6GhQyMKOnk+J rkYQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eS2pHSNT; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79740-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79740-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u12-20020ae9c00c000000b007879b80f197si1328012qkk.680.2024.02.24.08.36.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Feb 2024 08:36:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79740-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eS2pHSNT; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79740-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79740-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7ABAC1C20DC2 for ; Sat, 24 Feb 2024 16:36:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A17A7250EA; Sat, 24 Feb 2024 16:36:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eS2pHSNT" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B9D6FC129; Sat, 24 Feb 2024 16:36:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708792595; cv=none; b=P9xTRp230hvnudXI7A0Z2hTbKejWZptBVhny++vKir2gzOR37skgLfKf/yAlKokxBIhIDq37fJgRf124FFK2oL05cNH6XujnWegEozNcyYOEqgtbawMVcigbSQK640O2DpDZ1sNhiyryJuX5AUi/8p/IgsMXFdDpA7LnN6uu0BA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708792595; c=relaxed/simple; bh=gM276SnHL2yQRhjWluMy72+pHXOACMKdHCyQEkwDvW0=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=qbnqZ0HfLxlH2MlbbDqDMHitzQGuMMV+E/NtZmER6xV7J0K2ohL1rNLdBryon37vyXbLrJ+H67l2Adm6nfpu+l8n8GWTZ6Wc4YT/JJlg6qG1bpiOxSIl7HiABWPjUpPXT5Klwk2vWCO3RGQJTri3SF7+Wl95MkOqdxDivhOW/KM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eS2pHSNT; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 625D2C433C7; Sat, 24 Feb 2024 16:36:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708792595; bh=gM276SnHL2yQRhjWluMy72+pHXOACMKdHCyQEkwDvW0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=eS2pHSNTctVqZzjxj55wZ7G7ek+cOc48r61zURdfat6qlFaGzGcVpU3AyLll0ReE8 m687ScBjqS9ptwEn7+/GQS0vXXvQERJbTmzekOQMPsAE+Rm5l7xqdUBQsIFTpNvVan tGNBuon5fdADFZjSTB3syn4s8w553xVYOtAQ8lhfvCJTPMwr0QY6llrhkVCuzlKIi7 HYNWKvi1US/l8T+p5PsbZn2jOKMLJhEF4ybzMMJboMSz5z41h1MSBhTqFKvjzRIZbj Suv2ANY/0FEO5GbXSBdxnIveTn4HZI1JuPPeveMFAcZvNZ39uRuR7yXC5C4kJM3+qa uWjP+05puz6Sg== Date: Sat, 24 Feb 2024 16:36:22 +0000 From: Jonathan Cameron To: David Lechner Cc: Mark Brown , Martin Sperl , David Jander , Michael Hennerich , Nuno =?UTF-8?B?U8Oh?= , Alain Volmat , Maxime Coquelin , Alexandre Torgue , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-iio@vger.kernel.org Subject: Re: [PATCH v2 1/5] spi: add spi_optimize_message() APIs Message-ID: <20240224163622.7499cdd0@jic23-huawei> In-Reply-To: <20240219-mainline-spi-precook-message-v2-1-4a762c6701b9@baylibre.com> References: <20240219-mainline-spi-precook-message-v2-0-4a762c6701b9@baylibre.com> <20240219-mainline-spi-precook-message-v2-1-4a762c6701b9@baylibre.com> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 19 Feb 2024 16:33:18 -0600 David Lechner wrote: > This adds a new spi_optimize_message() function that can be used to > optimize SPI messages that are used more than once. Peripheral drivers > that use the same message multiple times can use this API to perform SPI > message validation and controller-specific optimizations once and then > reuse the message while avoiding the overhead of revalidating the > message on each spi_(a)sync() call. > > Internally, the SPI core will also call this function for each message > if the peripheral driver did not explicitly call it. This is done to so > that controller drivers don't have to have multiple code paths for > optimized and non-optimized messages. > > A hook is provided for controller drivers to perform controller-specific > optimizations. > > Suggested-by: Martin Sperl > Link: https://lore.kernel.org/linux-spi/39DEC004-10A1-47EF-9D77-276188D2580C@martin.sperl.org/ > Signed-off-by: David Lechner Very nice. Reviewed-by: Jonathan Cameron