From nobody Thu Sep 24 20:03:26 2026 Received: from mail.fris.de (mail.fris.de [116.203.77.234]) (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 138F23C5DC5; Mon, 21 Sep 2026 10:17:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.203.77.234 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789985847; cv=none; b=uuaTACkOdBCM6F0zUSTkmSkszZbp6tLcpSqry3Qq6qGhBpoUsS0pCIhIt1PMx6ffA31F/6rF1Z8/AKw0ZGeDyQYDUxAbZ1r+vkZ+trpu64C1XBFsgb3gPgDxjDpbyGKovDX/ynM/CMj0JXd3RWLMMyNLkPT1P1M3stT5VkAeNmI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789985847; c=relaxed/simple; bh=GacY+jMoFT8nvHAYb3gWh4H6aKjjn0Uux/cosswgUt0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fb73kJVgGIm+9GDk5jLuFRAwotS7pnFdAfy39h8uaGxqPonygFjAzPd9jzZlIB6zMHuEX/fHltaJrDRwZ+BHgVfZj9hIu5uZKvB18fyq4AihNRgOJ2WIRtcwY7crFuN4DZ01lv+icdpKpfxQXW+gQyzRbciPOXx6BpThXXqE/bE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=fris.de; spf=pass smtp.mailfrom=fris.de; dkim=pass (2048-bit key) header.d=fris.de header.i=@fris.de header.b=Dn2Ai9na; arc=none smtp.client-ip=116.203.77.234 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=fris.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fris.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fris.de header.i=@fris.de header.b="Dn2Ai9na" From: Frieder Schrempf DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fris.de; s=mail; t=1789985835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t+5kItn/dLA8g58laqBchtZJn0cTJ6aBuyxpWo3F+/g=; b=Dn2Ai9na/RuSGFC9OQUKmgxtv3Q7A38cSnV7c0hw/sP0PkYKDkks1x8uqZJ7l6jChn72QI e016oafrslm3pi1fI0tqG0aNwfNLz9E4kJ67fwdZ+nDGKU5a7rtnduq84yA6A0xR0WA1gs CovVSPvR17hS1TDc65XG59m2/PITGUp2VHOQCA0yCTCmnlvPw/y5IZeHomy3lTlonT9Klw 2jPn9aJgxCQZoG83kofPlBGrwxJqUzd0PasjA5EcJRrPa40XGdygh4GjlwyPuvAbNi7hBP lnaHBmALz0dXyk/8WsnY5CdKIKTn8WP91nw01/2FJSGr+5F/E0E1a5WC/poCiQ== Date: Mon, 21 Sep 2026 12:16:44 +0200 Subject: [PATCH v2 1/3] spi: dt-bindings: Clarify what rx-sample-delay-ns describes 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260921-spi-sample-delay-cleanup-v2-1-b460d572fd32@kontron.de> References: <20260921-spi-sample-delay-cleanup-v2-0-b460d572fd32@kontron.de> In-Reply-To: <20260921-spi-sample-delay-cleanup-v2-0-b460d572fd32@kontron.de> To: Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner Cc: linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Frieder Schrempf X-Developer-Signature: v=1; a=openpgp-sha256; l=2775; i=frieder.schrempf@kontron.de; h=from:subject:message-id; bh=TlRhZ1qfD0/hQwYMH3NUSnheV4zFAnhEGcsyBBxk8ps=; b=owGbwMvMwCWWWSatKlDTJMZ4Wi2JIWsji9b0f2zdv3o0Ni6tc97psa3G+97TxNBDK1ofL1u9u 2LVwnlqHaUsDGJcDLJiiixS/Bavbc1ifeSPVUfBzGFlAhnCwMUpABM5nsrwP3q7m3Bn4WqrZpHZ XGLeBb5TKrIVp+677OTYoBxQlLwplOGv+IaqTLFZnCWrdPrP9R9UPc/80W1h5K3F/1wVXigcOWr HAwA= X-Developer-Key: i=frieder.schrempf@kontron.de; a=openpgp; fpr=1A0F38EB3D365D4C1FC67B5A69761B25107C8216 From: Frieder Schrempf The property is documented as an offset from the controller's default sampling time. That says what the value does, but not what it is meant to describe, and it leaves room for two readings: a delay that belongs to the board, or a stand-in for the peripheral's own clock-to-output-valid time, which has no other expression in a device tree today. The first reading is the original one. The property was introduced for Rockchip in commit 76b17e6e4923 ("spi/rockchip: Add device tree property to configure Rx Sample Delay") to deal with "boards with high-capacitance SPI lines", where "the controller samples the Rx data line too early". The current wording arrived later, in commit 5ce78f4456a9 ("dt-bindings: snps, dw-apb-ssi: Add sparx5 support, plus rx-sample-delay-ns property"), where it described a DesignWare register and was qualified as such. That qualification was dropped when the property was moved to the generic schema in commit b658be56e867 ("spi: dt-bindings: Move 'rx-sample-delay-ns' to spi-peripheral-props.yaml"), leaving a register description standing in for a definition. The distinction matters because the two compose. A board delay is specific to one design, while a datasheet timing parameter is the same wherever the chip is soldered, so a mechanism that derives the chip side from the chip would add to a value that already accounts for it. Spell out that the property describes the board. Nothing changes in what the value means or in how existing device trees are interpreted. Assisted-by: Claude:claude-opus-5 Signed-off-by: Frieder Schrempf --- Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml | 8 ++++++= ++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yam= l b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml index 880a9f624566..afcf9c41c058 100644 --- a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml +++ b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml @@ -91,6 +91,14 @@ properties: The delay from the default sample time before the actual sample of the rxd input signal occurs. =20 + This describes the board rather than the peripheral, namely the extra + delay this particular design needs, for example because of the fligh= t time + of the clock and data signals between controller and peripheral. + + Timing parameters of the peripheral itself, such as its + clock-to-output-valid time, are the same on every board using that c= hip + and should be described with the chip. + spi-tx-bus-width: description: Bus width to the SPI bus used for write transfers. --=20 2.55.0 From nobody Thu Sep 24 20:03:26 2026 Received: from mail.fris.de (mail.fris.de [116.203.77.234]) (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 1428C3C9EE5; Mon, 21 Sep 2026 10:17:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.203.77.234 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789985848; cv=none; b=L1AXsAA5akjGeqnGXy1CmiuxcDxUt1y8/Ys3BCQ8+/O9N+dlBFxViAzb5vtqal7+ePG3SW/X1Hqr4D7yPYRJqR6HQKH4KlNHDtBAB53f7kKjnL0EPKPtGBCRxjDD0JL8jD/doXo2jpDni/zbNM4K9L3mUNcpM/1LNZXw+IjBghM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789985848; c=relaxed/simple; bh=1oYRZuFvI7S5Ss30nbv/q/igQt3wf8fSuSjrcbba7rg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=c8E+FT6xRWMYggZt3iBDq9zPZcCMpx4dkqZL7RXxGFd48FQLSzwHwe/1oEXJA82is/jk/OiWSB6bb0XhNu8n085rRnbF2un8UXVj7lSqoI1klP8LFuyCowOw0njIOfbBRA9VlKlfdojMKW0Gjumt2dTnPUmf0DcEr+E73Kv3CpU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=fris.de; spf=pass smtp.mailfrom=fris.de; dkim=pass (2048-bit key) header.d=fris.de header.i=@fris.de header.b=gkxvSpuv; arc=none smtp.client-ip=116.203.77.234 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=fris.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fris.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fris.de header.i=@fris.de header.b="gkxvSpuv" From: Frieder Schrempf DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fris.de; s=mail; t=1789985835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=90vRHS/V2op7RmcBd44fFmnN4zQU+VelDx0s5M+vwFw=; b=gkxvSpuv72pdDAU+Guw2nph8bf4L2JDSxsjrTxK+uWqa1T4WNFbcnX3SsRQQxo3xM6U6/r CSKAwPaAmAnh5LzqH9Z2Kak6BZUIuOvxFQutl4knFZ7c32vytzwgtctZhmepGfHyZ/U/Su YC90r+W8XdPV1AvwR4E6QSCRhULS8Wuqi2LbzXdeAxq4E4RxJre4dOkbNJDhJWLcoZFeG6 tjCWCdsuKmdUM4cRZpVt3n1waBUw/2xB1RPNg1ppKHkdQ3FdkycG41fKsXzSnvACJTCoSX PMEfC6LpVH/toWyXlHkmXr4JGCY9s5QDIBemp+43D036n4ZZlqDtUmv6SSdPjQ== Date: Mon, 21 Sep 2026 12:16:45 +0200 Subject: [PATCH v2 2/3] spi: Parse the rx-sample-delay-ns peripheral property in the core 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260921-spi-sample-delay-cleanup-v2-2-b460d572fd32@kontron.de> References: <20260921-spi-sample-delay-cleanup-v2-0-b460d572fd32@kontron.de> In-Reply-To: <20260921-spi-sample-delay-cleanup-v2-0-b460d572fd32@kontron.de> To: Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner Cc: linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Frieder Schrempf X-Developer-Signature: v=1; a=openpgp-sha256; l=3132; i=frieder.schrempf@kontron.de; h=from:subject:message-id; bh=YuOQ2sqjfzq8/kx5BwZr8fKOIcuHnw/CDnFbgOkUBAA=; b=owGbwMvMwCWWWSatKlDTJMZ4Wi2JIWsji9aPDbc0nRt8r6YtWRlTY3Tq9N2kZQp3JBijdgvNZ /0Y+UK7o5SFQYyLQVZMkUWK3+K1rVmsj/yx6iiYOaxMIEMYuDgFYCKnTBn+h79LeVOXc2jiqovm DkEbTEuNv6XyGH/6+ubYP+ui+ILMLYwMzacnvPUOyKm/LVk0p7fJxuyFmtGz1yGXntrNkzbVbJr EBAA= X-Developer-Key: i=frieder.schrempf@kontron.de; a=openpgp; fpr=1A0F38EB3D365D4C1FC67B5A69761B25107C8216 From: Frieder Schrempf "rx-sample-delay-ns" is documented in spi-peripheral-props.yaml as a generic SPI peripheral property, but the core never looks at it. Only spi-dw reads it from the peripheral node as the binding describes, and any other driver wanting to act on it would have to duplicate that. Add spi_device.rx_sample_delay_ns and parse the property once, in __spi_add_device(), which covers every way a device can be instantiated and runs before ->setup(). Use device_property_read_u32() rather than adding this to of_spi_parse_dt(). spi-dw already uses the fwnode accessor, so the property works today on ACPI and software node platforms such as the ones served by spi-dw-pci, and parsing it only in the device tree path would quietly drop it there. No functional change, since nothing reads the new field yet. Assisted-by: Claude:claude-opus-5 Signed-off-by: Frieder Schrempf --- drivers/spi/spi.c | 9 +++++++++ include/linux/spi/spi.h | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 5b5b3bc5f0d8..9e3c24ed8f9f 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -929,6 +929,15 @@ static int __spi_add_device(struct spi_device *spi, st= ruct spi_device *parent) } } =20 + /* + * Peripheral properties the core handles on behalf of controller + * drivers are parsed here, rather than in the firmware specific + * instantiation paths, so that device tree, ACPI and software nodes + * are covered alike, and early enough for ->setup() to act on them. + */ + device_property_read_u32(&spi->dev, "rx-sample-delay-ns", + &spi->rx_sample_delay_ns); + /* * Drivers may modify this initial i/o setup, but will * normally rely on the device being setup. Devices diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 88d17fce02dc..fb4baa0d3398 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -169,6 +169,12 @@ extern void spi_transfer_cs_change_delay_exec(struct s= pi_message *msg, * @cs_inactive: delay to be introduced by the controller after CS is * deasserted. If @cs_change_delay is used from @spi_transfer, then the * two delays will be added up. + * @rx_sample_delay_ns: Delay in nanoseconds by which the controller should + * postpone sampling the incoming data, relative to the sampling point it + * uses by default. Describes the board rather than the device, namely the + * flight time of the clock and data signals between controller and + * device, and comes from the "rx-sample-delay-ns" property. Zero when the + * property is absent. * @chip_select: Array of physical chipselect, spi->chipselect[i] gives * the corresponding physical CS for logical CS i. * @num_chipselect: Number of physical chipselects used. @@ -235,6 +241,9 @@ struct spi_device { struct spi_delay cs_hold; struct spi_delay cs_inactive; =20 + /* Additional delay before the incoming data is sampled, in ns */ + u32 rx_sample_delay_ns; + u8 chip_select[SPI_DEVICE_CS_CNT_MAX]; u8 num_chipselect; =20 --=20 2.55.0 From nobody Thu Sep 24 20:03:26 2026 Received: from mail.fris.de (mail.fris.de [116.203.77.234]) (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 18E3B3CB57C; Mon, 21 Sep 2026 10:17:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.203.77.234 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789985848; cv=none; b=ZeGu8QhQrXG2q4p+lgtKx7pVVziiI7rVzyYaKd5hngnhLUIBRp42XVs34+aa5tE2SI8OsKzCF6JudzNQZQ0q37zJuJzh3P8bB+adtTewh2Rz8BiqOpxOmlBqma2zPgeDJkURs9vI8Ra9G6axu+zUL1/XcVZ75YCK22ieOPON1FU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789985848; c=relaxed/simple; bh=f5k0pDKryWDsRKFbP8pNaZKdzeqx950Nhd1MszmVogU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PSNLDRv12/ll635Rg8Kbko4Ez/UY64R6DKIq1MxyGv12WplCBgmQLn3TO0wwjK+zbxg+t9jiEk7jyQ7ILl4fMOjbVVxzuYJNBpGrv3AF8CPbz0swqH0xt7YIR+tYNfSG/hJUcqzuUywpurIzDZP712mcKM+xuJXC8EsN7giFYdI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=fris.de; spf=pass smtp.mailfrom=fris.de; dkim=pass (2048-bit key) header.d=fris.de header.i=@fris.de header.b=cmOrwUCT; arc=none smtp.client-ip=116.203.77.234 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=fris.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fris.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fris.de header.i=@fris.de header.b="cmOrwUCT" From: Frieder Schrempf DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fris.de; s=mail; t=1789985836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Wr2AnAyGpEYLu/a4pBAtgSY2fg4oeIUJzy4LCp//70Y=; b=cmOrwUCTWdilfAHxEtzSuHM6KjEy4V3It1tIQkfIDrJ3/t46crfCBjguJonZ0BXwSAf+9t BsPY3ODPdm7uX7WC7Swp/CP6OICUd3WK5MGxfdib7w/KjyPm0HPsPjEbrivbuAIS8GaU19 z01z9Q9CaxFEyta/iVXRmyw+V6LqtW3GmAKhxKt6f8EHeIcnybVD5JYEIvY/inDcr5akMB ZDXIL5YrwNi8er9I7TRFIQlyp34VHphzY028hcp7Q06nKqumLzbdHLqcI0PGFBO/cc+OkS l+JipBP8JrLtHH/Fe6nOp0veXuU4BlMDINglyuHMZtGhy0hrsrPhpmlpBBCDUw== Date: Mon, 21 Sep 2026 12:16:46 +0200 Subject: [PATCH v2 3/3] spi: dw: Use the rx-sample-delay-ns value parsed by the core 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260921-spi-sample-delay-cleanup-v2-3-b460d572fd32@kontron.de> References: <20260921-spi-sample-delay-cleanup-v2-0-b460d572fd32@kontron.de> In-Reply-To: <20260921-spi-sample-delay-cleanup-v2-0-b460d572fd32@kontron.de> To: Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner Cc: linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Frieder Schrempf X-Developer-Signature: v=1; a=openpgp-sha256; l=2128; i=frieder.schrempf@kontron.de; h=from:subject:message-id; bh=mgQgwES2Pc1SSRbRExhFGQn56WBZxKlQB6CyUrwMRTo=; b=owGbwMvMwCWWWSatKlDTJMZ4Wi2JIWsji5bV0uernm5YpecuwZu75OHT1blX9jo+FAs20D5xa GLXlrzejlIWBjEuBlkxRRYpfovXtmaxPvLHqqNg5rAygQxh4OIUgIn01TIyHOzS+Dgr4odU+LpW g4W9HDIG82Z/CeQ55pgsn6M87X+IJMMffr6OgqdeO1dVFbmcfHbuXmv+lEk+U5trPNeGdi6tWPu fBQA= X-Developer-Key: i=frieder.schrempf@kontron.de; a=openpgp; fpr=1A0F38EB3D365D4C1FC67B5A69761B25107C8216 From: Frieder Schrempf The core now parses the "rx-sample-delay-ns" peripheral property into spi_device.rx_sample_delay_ns, so drop the private copy of that parsing. The controller-wide default is deliberately left alone. It is read from the *controller* node into dws->def_rx_sample_dly_ns, which is a different node and none of the core's business when it parses properties of a peripheral. One corner case changes: the peripheral value is now treated as unset when it is zero, whereas before an absent property could be told apart from an explicit "rx-sample-delay-ns =3D <0>", the latter overriding a non-zero controller default with no delay at all. There are no in-tree users affected by this and it is very unlikely for out-of-tree users to set rx-sample-delay-ns on the controller level and then revert it to 0 at the chip level. We should abandon this configuration that was probably never meant to work like this and doesn't make sense. Assisted-by: Claude:claude-opus-5 Signed-off-by: Frieder Schrempf --- drivers/spi/spi-dw-core.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/spi/spi-dw-core.c b/drivers/spi/spi-dw-core.c index 206d3f9dd83d..b86b607cc817 100644 --- a/drivers/spi/spi-dw-core.c +++ b/drivers/spi/spi-dw-core.c @@ -1104,12 +1104,13 @@ static int dw_spi_setup(struct spi_device *spi) if (!chip) return -ENOMEM; spi_set_ctldata(spi, chip); - /* Get specific / default rx-sample-delay */ - if (device_property_read_u32(&spi->dev, - "rx-sample-delay-ns", - &rx_sample_dly_ns) !=3D 0) - /* Use default controller value */ - rx_sample_dly_ns =3D dws->def_rx_sample_dly_ns; + /* + * Use the per-device value the core parsed from the peripheral + * node, and fall back to the controller-wide default when the + * device does not ask for a delay of its own. + */ + rx_sample_dly_ns =3D spi->rx_sample_delay_ns ?: + dws->def_rx_sample_dly_ns; chip->rx_sample_dly =3D DIV_ROUND_CLOSEST(rx_sample_dly_ns, NSEC_PER_SEC / dws->max_freq); --=20 2.55.0