lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240621112600.sshdjicucwtigq64@skbuf>
Date: Fri, 21 Jun 2024 14:26:00 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: Frank Li <Frank.Li@....com>
Cc: Mark Brown <broonie@...nel.org>, Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>, Shawn Guo <shawnguo@...nel.org>,
	linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org,
	devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	imx@...ts.linux.dev
Subject: Re: [PATCH v3 1/3] spi: fsl-dspi: use common proptery
 'spi-cs-setup(hold)-delay-ns'

Typo in title: property

On Thu, Jun 20, 2024 at 12:58:27PM -0400, Frank Li wrote:
> Use SPI common DT binding properties 'spi-cs-setup-delay-ns' and
> 'spi-cs-hold-delay-ns'. If these properties do not exist, fall back to
> legacy 'fsl,spi-cs-sck-delay' and 'fsl,spi-sck-cs-delay'.
> 
> Signed-off-by: Frank Li <Frank.Li@....com>
> ---
>  drivers/spi/spi-fsl-dspi.c | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
> index 0a2730cd07c6a..7c1f8af9d215e 100644
> --- a/drivers/spi/spi-fsl-dspi.c
> +++ b/drivers/spi/spi-fsl-dspi.c
> @@ -1018,11 +1018,15 @@ static int dspi_setup(struct spi_device *spi)
>  	pdata = dev_get_platdata(&dspi->pdev->dev);
>  
>  	if (!pdata) {
> -		of_property_read_u32(spi->dev.of_node, "fsl,spi-cs-sck-delay",
> -				     &cs_sck_delay);
> -
> -		of_property_read_u32(spi->dev.of_node, "fsl,spi-sck-cs-delay",
> -				     &sck_cs_delay);
> +		cs_sck_delay = spi_delay_to_ns(&spi->cs_setup, NULL);
> +		if (!cs_sck_delay)
> +			of_property_read_u32(spi->dev.of_node, "fsl,spi-cs-sck-delay",
> +					     &cs_sck_delay);
> +
> +		sck_cs_delay = spi_delay_to_ns(&spi->cs_hold, NULL);
> +		if (!sck_cs_delay)
> +			of_property_read_u32(spi->dev.of_node, "fsl,spi-sck-cs-delay",
> +					     &sck_cs_delay);

Keep the 80 character line limit please.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ