From nobody Fri Oct 10 04:00:29 2025 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) (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 B98082749CE; Mon, 16 Jun 2025 09:23:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.132.182.106 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750065840; cv=none; b=oQrCEpwgioB5lIKcIhSgMaL286uKoENwMkzqFLyKB5clZSuNot3mP1lqpzLgx9PH2EH/lF7/rjzWE5ew3hiPSaQBWVddGdQVpen73GFEHI8BeylrCocEe3WCdQ66oCr2v0GKh2wi49d/7M/tJ2/D7D1duEKxNUab+VjMzk4TrmQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750065840; c=relaxed/simple; bh=pIgUsai1agcR2yyeqDHuvTcbLOReqwugIAcntirOonY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=cCK7ny3La30p/FUQak0JPp74oLhyr3C0kjm3enKOznpgU1hH+8WGEtsoFH9Fa7JzGvMKRMKuHfQjOkHFk/hbTAUflR4izYMZHU46/xvCtMvkIBCyXETNkalAFs44Tg1whdmbKpt8eoLzC+ap9+aHByx39b8Q2dQmUtM2LP3tCBQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com; spf=pass smtp.mailfrom=foss.st.com; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b=tPNEq1gw; arc=none smtp.client-ip=185.132.182.106 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=foss.st.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b="tPNEq1gw" Received: from pps.filterd (m0369458.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 55G7qXNA001111; Mon, 16 Jun 2025 11:23:42 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=selector1; bh= g+teT4hcWlE6FbbDd8cFYpmDv8L8s8toVgg8l99SV50=; b=tPNEq1gwIwCMGT1O zShj60AR3KvMaxqHUr1gonPu1q5PSb3u4Il3S1pGyDpR0f5BicdqadtheYmia7L9 xUMR+75OZSMXaTB/QKd145RsmVGtsNMdGdujJ6kAOVAhJk+6pOC/C8UTe2HctrxA lZErrSRksn9RluAkr3jlvSZaTILINPfEmxuS1ui4/Yut+Kd5SA1yIZpkJiTPMAX+ DYsTcDLj/Pu+Y6U/y3gjW5PnRqaRYrWh0anBSzQSYedUIXbd40JC2vz/VEGa/59N fa1Kwdzwf8KPHUf+1I0XngPZ6oOii2R1kBS9rRYq4XPtciWzVH+tYLXp65ZmccDu D4Qiew== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 479jn4mm80-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Jun 2025 11:23:42 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 0832F40050; Mon, 16 Jun 2025 11:22:29 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node2.st.com [10.75.129.70]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 30AADAA6EE7; Mon, 16 Jun 2025 11:21:11 +0200 (CEST) Received: from localhost (10.252.14.42) by SHFDAG1NODE2.st.com (10.75.129.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 16 Jun 2025 11:21:10 +0200 From: =?utf-8?q?Cl=C3=A9ment_Le_Goffic?= Date: Mon, 16 Jun 2025 11:21:06 +0200 Subject: [PATCH 5/6] spi: stm32: deprecate `st,spi-midi-ns` property 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: <20250616-spi-upstream-v1-5-7e8593f3f75d@foss.st.com> References: <20250616-spi-upstream-v1-0-7e8593f3f75d@foss.st.com> In-Reply-To: <20250616-spi-upstream-v1-0-7e8593f3f75d@foss.st.com> To: Alain Volmat , Mark Brown , Maxime Coquelin , Alexandre Torgue , Valentin Caron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Erwan Leray , Fabrice Gasnier , Sumit Semwal , =?utf-8?q?Christian_K=C3=B6nig?= CC: , , , , , , , , =?utf-8?q?Cl=C3=A9ment_Le_Goffic?= X-Mailer: b4 0.15-dev-c25d1 X-ClientProxiedBy: SHFCAS1NODE2.st.com (10.75.129.73) To SHFDAG1NODE2.st.com (10.75.129.70) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-06-16_04,2025-06-13_01,2025-03-28_01 The `st,spi-midi-ns` property, which was used to set a nanosecond delay between transferred words, is now deprecated. This functionality is now supported by the SPI framework through the `spi_transfer` struct's `word_delay` variable. Therefore, the private `st,spi-midi-ns` property is no longer needed and has been deprecated in favor of the generic solution. Signed-off-by: Cl=C3=A9ment Le Goffic --- drivers/spi/spi-stm32.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c index 8581f24c111f..3d20f09f1ae7 100644 --- a/drivers/spi/spi-stm32.c +++ b/drivers/spi/spi-stm32.c @@ -283,7 +283,7 @@ struct stm32_spi_cfg { int (*config)(struct stm32_spi *spi); void (*set_bpw)(struct stm32_spi *spi); int (*set_mode)(struct stm32_spi *spi, unsigned int comm_type); - void (*set_data_idleness)(struct stm32_spi *spi, u32 length); + void (*set_data_idleness)(struct stm32_spi *spi, struct spi_transfer *xfe= r); int (*set_number_of_data)(struct stm32_spi *spi, u32 length); void (*write_tx)(struct stm32_spi *spi); void (*read_rx)(struct stm32_spi *spi); @@ -1880,11 +1880,26 @@ static int stm32h7_spi_set_mode(struct stm32_spi *s= pi, unsigned int comm_type) * stm32h7_spi_data_idleness - configure minimum time delay inserted betwe= en two * consecutive data frames in host mode * @spi: pointer to the spi controller data structure - * @len: transfer len + * @xfer: pointer to spi transfer */ -static void stm32h7_spi_data_idleness(struct stm32_spi *spi, u32 len) +static void stm32h7_spi_data_idleness(struct stm32_spi *spi, struct spi_tr= ansfer *xfer) { u32 cfg2_clrb =3D 0, cfg2_setb =3D 0; + u32 len =3D xfer->len; + u32 spi_delay_ns; + + spi_delay_ns =3D spi_delay_to_ns(&xfer->word_delay, xfer); + + if (spi->cur_midi !=3D 0) { + dev_warn(spi->dev, "st,spi-midi-ns DT property is deprecated\n"); + if (spi_delay_ns) { + dev_warn(spi->dev, "Overriding st,spi-midi-ns with word_delay_ns %d\n", + spi_delay_ns); + spi->cur_midi =3D spi_delay_ns; + } + } else { + spi->cur_midi =3D spi_delay_ns; + } =20 cfg2_clrb |=3D STM32H7_SPI_CFG2_MIDI; if ((len > 1) && (spi->cur_midi > 0)) { @@ -1975,7 +1990,7 @@ static int stm32_spi_transfer_one_setup(struct stm32_= spi *spi, spi->cur_comm =3D comm_type; =20 if (STM32_SPI_HOST_MODE(spi) && spi->cfg->set_data_idleness) - spi->cfg->set_data_idleness(spi, transfer->len); + spi->cfg->set_data_idleness(spi, transfer); =20 if (spi->cur_bpw <=3D 8) nb_words =3D transfer->len; --=20 2.43.0