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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <301b3c390b417c1268c0c1d3014d52f8b8660aba.camel@gmail.com>
Date: Fri, 27 Jun 2025 16:52:49 +0100
From: Nuno Sá <noname.nuno@...il.com>
To: Antoniu Miclaus <antoniu.miclaus@...log.com>, jic23@...nel.org, 
	robh@...nel.org, conor+dt@...nel.org, devicetree@...r.kernel.org, 
	linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] iio: adc: ad4851: add spi 3-wire support

On Thu, 2025-06-26 at 13:40 +0300, Antoniu Miclaus wrote:
> Add support for 3-wire configuration within the driver.
> By default 4-wire configuration is used.
> 
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@...log.com>
> ---

Had to look twice :). Commit message could have been better by saying that reset
value is 3-wire. Anyways:

Reviewed-by: Nuno Sá <nuno.sa@...log.com>

>  drivers/iio/adc/ad4851.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/iio/adc/ad4851.c b/drivers/iio/adc/ad4851.c
> index 31e1e02c0ce3..1ad77f2a4580 100644
> --- a/drivers/iio/adc/ad4851.c
> +++ b/drivers/iio/adc/ad4851.c
> @@ -444,10 +444,12 @@ static int ad4851_setup(struct ad4851_state *st)
>  	if (ret)
>  		return ret;
>  
> -	ret = regmap_write(st->regmap, AD4851_REG_INTERFACE_CONFIG_A,
> -			   AD4851_SDO_ENABLE);
> -	if (ret)
> -		return ret;
> +	if (!(st->spi->mode & SPI_3WIRE)) {
> +		ret = regmap_write(st->regmap, AD4851_REG_INTERFACE_CONFIG_A,
> +				   AD4851_SDO_ENABLE);
> +		if (ret)
> +			return ret;
> +	}
>  
>  	ret = regmap_read(st->regmap, AD4851_REG_PRODUCT_ID_L, &product_id);
>  	if (ret)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ